home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 July / july_2000.iso / Site Building / A-Soft Analog Shell 2.0 / A-Soft Analog Shell 2.msi / Instal01.cab / _F8F93911E96F11D3AD4F002018280775 < prev    next >
Encoding:
Text File  |  2000-02-21  |  324.0 KB  |  6,903 lines

  1. <html><head><title>Readme for analog 4.03</title></head>
  2. <body><h1>Readme for <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog 4.03</a></h1>
  3. <a name="Readme"><h2>Introduction</h2>
  4. </a>
  5. Analog is a program which analyses logfiles from WWW servers. It works on
  6. almost any operating system. It is designed to be fast and to produce
  7. attractive statistics. It's free software.
  8.  
  9. <p>Beginners should read the <a href="Licence.txt">licence</a> followed by the
  10. section on <cite><a href="#start">Starting to use analog</a></cite>.
  11.  
  12. <p>This Readme describes analog 4.03. For the latest version of analog, see the
  13. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>.
  14. For examples of the output see
  15. <ul>
  16.   <li><a href="http://www.statslab.cam.ac.uk/~sret1/stats/stats.html">our
  17.       local statistics.</a>
  18.   <li><a href="http://www.statslab.cam.ac.uk/~sret1/stats/statsme.html">statistics for my pages.</a>
  19. </ul>
  20.  
  21. <p>
  22. Analog is free software, but its usage, distribution and modification are
  23. covered by a <a href="Licence.txt">licence</a>. You must agree to the terms of
  24. the licence before using the program. In particular, it comes with <em>no
  25. warranty</em>.
  26.  
  27. <p>
  28. This is a version of the Readme in one page. If you're reading it on line,
  29. you might prefer the version on <a href="Readme.html">several smaller
  30. pages</a>. There is an <a href="#indx">index</a> at the end of this
  31. document.
  32.  
  33. <p>
  34. Now you can go to
  35. <ul>
  36.   <li><a href="#start">Starting to use analog</a>
  37.   <li><a href="#custom">Customising analog</a>
  38.   <li><a href="#meaning">What the results mean</a>
  39.   <li><a href="#errors">Errors and warnings</a>
  40.   <li><a href="#faq">Frequently asked questions (FAQ)</a>
  41.   <li><a href="#mailing">Mailing lists</a>
  42.   <li><a href="#helpers">Helper applications</a>
  43.   <li><a href="#acknow">Acknowledgements</a>
  44.   <li><a href="#whatsnew">What's new in this version?</a>
  45.   <li><a href="#quickref">Quick reference</a> (for experts)
  46.   <li><a href="#indx">Index</a>
  47. </ul>
  48.  
  49. <hr>
  50. <hr>
  51. <a name="start"><h2>Starting to use analog</h2>
  52. </a>
  53. The only thing you need to run analog is to be able to read the logfiles
  54. which are produced by your web server. If you don't know what these logfiles
  55. are and where to find them, contact your internet service provider (ISP) or
  56. system administrator. Analog doesn't write the logfiles: it only reads them.
  57.  
  58. <p>
  59. If you log in to your ISP's machine from your home machine, you have two
  60. options. If you have the right permissions, you can run analog on your ISP's
  61. machine. Otherwise, you can download (e.g., ftp) the logfiles from their
  62. machine to yours, and then run analog on your machine.
  63.  
  64. <p>
  65. Once you've downloaded the right version of analog for your computer from the
  66. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>
  67. (or a mirror site), you need to know how to set it up and run it. This is
  68. very easy, but the instructions are slightly different depending which
  69. platform you're using.
  70. <ul>
  71.   <li><a href="#startmac">Mac users</a>
  72.   <li><a href="#startpc">Windows users</a>
  73.   <li><a href="#startos2">OS/2</a>
  74.   <li><a href="#startux">Everyone else</a> (Unix, OpenVMS, Acorn,
  75.       Windows 3.1 etc.)
  76. </ul>
  77.  
  78. <p>
  79. If you can't manage to set up analog after reading the instructions, send
  80. a message to the <a href="#mailing">analog-help mailing list</a>.
  81.  
  82. <hr>
  83. <hr>
  84. <a name="startmac"><h2>Starting to use analog on a Mac</h2>
  85. </a>
  86. When you download the Mac version of analog, it should unpack itself. (If it
  87. doesn't, you might have to run StuffIt Expander on it). You should then find
  88. in the analog directory a configuration file called <kbd>analog.cfg</kbd>
  89. and the analog application itself, as well as the Readme, the
  90. <a href="Licence.txt">Licence</a> (which you must read and agree to before
  91. using analog) and a couple of other files. When you double-click on the analog
  92. icon, it will run in its own window, and produce an output file called
  93. <kbd>Report.html</kbd>. (For help in interpreting the output, see
  94. <cite><a href="#meaning">What the results mean</a></cite>.)
  95. The window will then close if there weren't any warning messages, or stay open
  96. for you to read them if there were.
  97.  
  98. <hr>
  99. You can configure analog by putting commands in the configuration file,
  100. <kbd>analog.cfg</kbd>. One command you will need straight away is
  101. <pre>
  102. LOGFILE logfilename    # to set where your logfile lives
  103. </pre>
  104. The logfile must be stored locally -- analog won't use FTP or HTTP to fetch
  105. it from the internet. There's a sample logfile supplied with the program.
  106.  
  107. <p>
  108. There's a list of <a href="#basiccmd">basic commands</a> later in the
  109. Readme. Also there are a few to get you started in the configuration file
  110. already, but there are lots of others available. You can read about all the
  111. commands in the section on <a href="#custom">customising analog</a>.
  112.  
  113. <hr>
  114. Another way to start analog is to drag a logfile onto the analog icon, in which
  115. case analog will try to analyse it, or drag a configuration file onto the
  116. icon, in which case analog will use the commands in that configuration file.
  117. (Analog detects whether it's a configuration file or a logfile by whether
  118. it starts with a <kbd>#</kbd> or not.) This enables you to create different
  119. reports without having two copies of the application.
  120.  
  121. <p>
  122. One note: on other platforms, there is another way to give options, via
  123. command line arguments. You'll see these mentioned in this Readme from time
  124. to time, but the Mac doesn't have a command line, so ignore these.
  125.  
  126. <p>
  127. If you want to compile your own version of analog (it's written in C), or
  128. just to read the source code, it's available from the
  129. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>.
  130. (It's the same source code for all versions).
  131.  
  132. <hr>
  133. <hr>
  134. <a name="startpc"><h2>Starting to use analog under Windows</h2>
  135. </a>
  136. This describes how to set up analog under Windows 95, 98 or NT.
  137. Windows 3.1 users will have to read the section on
  138. <a href="#startux">other platforms</a> instead.
  139.  
  140. <p>
  141. When you've downloaded analog, and either you or your browser has unzipped
  142. it, you will find in the analog folder a configuration file called
  143. <kbd>analog.cfg</kbd> and the analog executable itself, as well as the Readme,
  144. the <a href="Licence.txt">Licence</a> (which you must read and agree to before
  145. using analog) and a couple of other files.
  146. There is no <kbd>setup.exe</kbd>: analog is already ready to run without one.
  147.  
  148. <p>
  149. (Some unzip programs are broken, and do not create folders when they should. If
  150. you don't have a folder called <kbd>lang</kbd> inside the analog folder,
  151. create one and put all the files called <kbd>*.lng</kbd> and <kbd>*.tab</kbd>
  152. into it.)
  153.  
  154. <p>
  155. There are two ways of running analog. You can either run it from Windows
  156. (by single-clicking or double-clicking on its icon, depending on your setup),
  157. or you can run it from the DOS command prompt (under Start-Programs). If you
  158. run it from Windows, it will create a DOS window to run in. When it's
  159. finished, it will produce an output file called <kbd>Report.html</kbd>. The
  160. first time you run it, this may all happen almost instantly. For help in
  161. interpreting the output, see <cite><a href="#meaning">What the results
  162. mean</a></cite>.
  163.  
  164. <hr>
  165. You can configure analog by putting commands in the configuration file,
  166. <kbd>analog.cfg</kbd>. One command you will need straight away is
  167. <pre>
  168. LOGFILE logfilename    # to set where your logfile lives
  169. </pre>
  170. The logfile must be stored locally -- analog won't use FTP or HTTP to fetch
  171. it from the internet. There's a sample logfile supplied with the program.
  172.  
  173. <p>
  174. There's a list of <a href="#basiccmd">basic commands</a> later in the
  175. Readme. Also there are a few to get you started in the configuration file
  176. already, but there are lots of others available. You can read about all the
  177. commands in the section on <a href="#custom">customising analog</a>.
  178.  
  179. <p>
  180. In some ways, it's easier to run analog from the DOS command prompt, because
  181. you get to see any error or warning messages more easily. Also, if you run
  182. analog from the command prompt, there is another way to give options, via
  183. command line arguments, given on the command line after the program name.
  184. These are just shortcuts for configuration file commands. You can use the
  185. command line arguments if you run analog from a batch file too.
  186.  
  187. <p>
  188. If you want to compile your own version of analog (it's written in C), or
  189. just to read the source code, it's available from the
  190. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>.
  191. (It's the same source code for all versions).
  192.  
  193. <hr>
  194. <hr>
  195. <a name="startos2"><h2>Starting to use analog under OS/2</h2>
  196. </a>
  197. When you've downloaded analog, and either you or your browser has unzipped
  198. it, you will find in the analog directory a configuration file called
  199. <kbd>analog.cfg</kbd> and the analog executable itself, as well as the Readme,
  200. the <a href="Licence.txt">Licence</a> (which you must read and agree to before
  201. using analog) and a couple of other files. You can run analog by just typing
  202. <kbd>analog</kbd>. It should produce an output file called
  203. <kbd>Report.html</kbd>. For help in interpreting the output, see
  204. <cite><a href="#meaning">What the results mean</a></cite>.
  205.  
  206. <hr>
  207. You can configure analog by putting commands in the configuration file,
  208. <kbd>analog.cfg</kbd>. One command you will need straight away is
  209. <pre>
  210. LOGFILE logfilename    # to set where your logfile lives
  211. </pre>
  212. You need to use <kbd>\</kbd> not <kbd>/</kbd> as the directory separator in
  213. the logfile name. The logfile must be stored locally -- analog won't use
  214. FTP or HTTP to fetch it from the internet. There's a sample logfile supplied
  215. with the program.
  216.  
  217. <p>
  218. There's a list of <a href="#basiccmd">basic commands</a> later in the
  219. Readme. Also there are a few to get you started in the configuration file
  220. already, but there are lots of others available. You can read about all the
  221. commands in the section on <a href="#custom">customising analog</a>.
  222.  
  223. <p>
  224. There is one other way to give options to analog, via command line arguments,
  225. given on the command line after the program name. These are just shortcuts for
  226. configuration file commands.
  227.  
  228. <p>
  229. If you want to compile your own version of analog (it's written in C), or
  230. just to read the source code, it's available from the
  231. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>.
  232. (It's the same source code for all versions). There are
  233. <a href="#compileOS2">instructions about compiling</a> on another
  234. page.
  235.  
  236. <hr>
  237. <hr>
  238. <a name="startux"><h2>Starting to use analog on other platforms</h2>
  239. </a>
  240. If you're not using one of the platforms for which a precompiled version of
  241. analog is available, you'll have to compile your own
  242. version from the source. But don't worry -- it's written in
  243. standard C throughout, so it will compile out of the box on most platforms.
  244. (The source code is the same for all platforms.)
  245.  
  246. <p>
  247. First, you should look at the file anlghead.h, and see if there's anything you
  248. want to edit. In particular, you need to set the <kbd>ANALOGDIR</kbd>.
  249.  
  250. <p>
  251. When you have done that, you need to compile the program. How to do that
  252. depends on which operating system you're using.
  253.  
  254. <hr>
  255. <b><a name="compileux">Compiling under Unix</a></b>. First edit anlghead.h as
  256. described above. Then just type
  257. <pre>
  258. make
  259. </pre>
  260. to compile the program. On most systems, that will be sufficient. If it
  261. fails to compile, have a look in the Makefile to see if there's anything that
  262. you need to change to suit your configuration, and try again. It says in that
  263. file what to do. In particular, <b>Solaris 2 (SunOS 5)</b> users need to
  264. change the <kbd>LIBS=</kbd> line.
  265. <p>
  266. (Experts can pass some arguments in on the <kbd>make</kbd> command line
  267. instead of by editing <kbd>anlghead.h</kbd>: e.g.
  268. <pre>
  269. make DEFS='-DANALOGDIR=\"/usr/etc/apache/analog/\"'
  270. </pre>
  271. This is useful if you have a script to compile analog.)
  272. <p>
  273. If you haven't got gcc, you will need to change the compiler - try acc or cc
  274. instead. If it still doesn't compile, try <kbd>DEFS=-DNODNS</kbd> to ignore the
  275. DNS lookup code.
  276. <p>
  277. There is a known problem with <b>HP-UX 10</b> and some versions of gcc. If it
  278. complains about an error in the <kbd><sys/stat.h></kbd> library, you
  279. need to upgrade to gcc version 2.7.2.3 or later, or use HP's cc compiler.
  280. HP's compiler is not an ANSI C compiler by default, so you need to specify
  281. <kbd>-Ae</kbd> in the <kbd>CFLAGS</kbd> to tell the compiler to use ANSI C.
  282. <p>
  283. <b>SunOS 4</b>'s cc and gcc don't have the necessary header files for ANSI
  284. C. If you have the ANSI C compiler acc, use that. Otherwise use the
  285. <kbd>DEFS</kbd> given in the Makefile.
  286. <p>
  287. <b>SunOS 5</b> users need to change the <kbd>LIBS=</kbd> line in the
  288. Makefile. Also, this OS sometimes seems to have a broken <kbd>strcmp()</kbd>
  289. function. If you get an "illegal instruction" error when running analog,
  290. compile it with the <kbd>-DNEED_STRCMP</kbd> in the <kbd>DEFS=</kbd> line.
  291. <p>
  292. <b><a name="compileVMS">Compiling under OpenVMS</a></b>. First edit anlghead.h
  293. as described above. Then type
  294. <pre>
  295. MMS
  296. </pre>
  297. to compile analog. 
  298. <p>
  299. <b><a name="compileRiscOS">Compiling under Acorn RiscOS</a></b>. The Makefile
  300. is called
  301. <kbd>Make.Risc</kbd>, and you will have to rename it to <kbd>Makefile</kbd>
  302. before running make. Also you have to make directories called <kbd>C</kbd>,
  303. <kbd>H</kbd> and <kbd>O</kbd>, and move the sources files into the appropriate
  304. directories: e.g., <kbd>alias.c</kbd> must be renamed <kbd>C.alias</kbd>. And
  305. you will find that there are some filenames in the header file
  306. <kbd>anlghead.h</kbd> that you want to change to fit into the RiscOS directory
  307. structure.
  308. <p>
  309. <b><a name="compileOS2">Compiling under OS/2</a></b>. Although there is a
  310. precompiled version of
  311. analog for OS/2, if you want to compile your own you will need the
  312. <a href="ftp://hobbes.nmsu.edu/pub/os2/dev/emx/">EMX package</a>. You should
  313. edit the Makefile to have <kbd>OS=OS2</kbd> and <kbd>LIBS=-lsocket</kbd>.
  314. Then after editing anlghead.h and running Make, you need to run the command
  315. <pre>
  316. EMXBIND -b ANALOG
  317. </pre>
  318. to generate the analog.exe executable.
  319. <hr>
  320. After you've made the program, just type
  321. <pre>
  322. analog
  323. </pre>
  324. to run the program. (Or <kbd>./analog</kbd> if for some reason <kbd>.</kbd>
  325. isn't in your <kbd>$PATH</kbd>.)
  326.  
  327. <p>
  328. You can configure analog by putting commands in the configuration file,
  329. which is called <kbd>analog.cfg</kbd> by default. Two commands you will need
  330. straight away are
  331. <pre>
  332. LOGFILE logfilename      # to set where your logfile lives
  333. OUTFILE outputfile.html  # to send the output to a file instead of the screen
  334. </pre>
  335. The logfile must be stored locally -- analog won't use FTP or HTTP to fetch
  336. it from the internet. There's a sample logfile supplied with the program.
  337.  
  338. <p>
  339. There's a list of <a href="#basiccmd">basic commands</a> later in the
  340. Readme. Also there are a few to get you started in the configuration file
  341. already, but there are lots of others available. You can read about all the
  342. commands in the section on <a href="#custom">customising analog</a>.
  343. For help in interpreting the output, see <cite><a href="#meaning">What the
  344. results mean</a></cite>.
  345. <p>
  346. There is one other way to give options to analog, via command line arguments,
  347. given on the command line after the program name. These are just shortcuts for
  348. configuration file commands.
  349.  
  350. <hr>
  351. <hr>
  352. <a name="custom"><h2>Customising analog</h2>
  353. </a>
  354. This section is the bulk of the Readme. It tells you all the commands
  355. you can give to analog, and what they all do. First there's a list of
  356. <ul>
  357.   <li><a href="#basiccmd">basic commands</a>
  358. </ul>
  359. which is as much as beginners need to read, until they want to do something
  360. which isn't listed there, or are curious to find out what they could do.
  361. <p>
  362. The following section is a technical (i.e., dull but important) section on the
  363. <ul>
  364.   <li><a href="#syntax">syntax of configuration commands</a>.
  365. </ul>
  366. Then there's documentation on all the configuration commands in the following
  367. categories. Analog has over 200 configuration commands and over 40 command
  368. line options, so sometimes these sections turn into lists of commands.
  369. But here's where you find out everything you can do with analog.
  370. <p>
  371. Later there's an <a href="#indx">index</a> of all the commands and topics,
  372. and also a <a href="#quickref">quick reference</a> containing the syntax
  373. of all the commands and examples.
  374. <ul>
  375.   <li><a href="#logfile">Choosing a logfile</a>
  376.   <li><a href="#logfmt">Specifying a log format</a>
  377.   <li><a href="#alias">Aliases</a>
  378.   <li><a href="#include">Inclusions and exclusions</a>
  379.   <li><a href="#args">Search arguments</a>
  380.   <li><a href="#output">Configuring the output</a>
  381.   <li><a href="#timereps">Time reports</a>
  382.   <li><a href="#othreps">Other reports</a>
  383.   <li><a href="#hierreps">Hierarchical reports</a>
  384.   <li><a href="#domfile">The domains file</a>
  385.   <li><a href="#compout">Computer-readable output</a>
  386.   <li><a href="#cache">Cache files</a>
  387.   <li><a href="#dns">DNS lookups</a>
  388.   <li><a href="#lowmem">Coping with low memory</a>
  389.   <li><a href="#debug">Debugging</a>
  390.   <li><a href="#form">Form interface and CGI program</a>
  391. </ul>
  392.  
  393. <hr>
  394. <hr>
  395. <a name="basiccmd"><h2>Basic commands</h2>
  396. </a>
  397. Here is a list of basic configuration commands to get you started with
  398. analog. These commands should be added to your configuration file,
  399. <kbd>analog.cfg</kbd>, as explained in the section on
  400. <cite><a href="#start">Starting to use analog</a></cite>.
  401. We'll see all the possible configuration commands in later sections.
  402. Or you can read a summary of the commands which control each report in the
  403. section on <cite><a href="#reports">Analog's reports</a></cite>.
  404.  
  405. <hr>
  406. Analog reads logfiles produced by your web server, and produces an output file
  407. based on the data in them. So you need to know how to specify which logfile to
  408. read, and which file to send the output to. The relevant commands look like
  409. <pre>
  410. LOGFILE my_logfile
  411. OUTFILE output.html
  412. </pre>
  413. where, of course, you should substitute the names of the files you want to use.
  414. The logfile must be stored locally -- analog won't use FTP or HTTP to fetch
  415. it from the internet, so you may have to fetch it yourself first.
  416. You can read several logfiles by giving several logfile commands, or by giving
  417. a comma-separated list, or by using wild cards in the logfile name. So, for
  418. example, if you use the commands
  419. <pre>
  420. LOGFILE new1.log,old*.log
  421. LOGFILE new2.log
  422. </pre>
  423. analog will analyse the logfiles <kbd>new1.log</kbd>, <kbd>new2.log</kbd>,
  424. and all the old logfiles. Analog will recognise logfiles in several different
  425. formats. You can read more about this in the section on
  426. <cite><a href="#logfile">Choosing a logfile</a></cite>.
  427.  
  428. <hr>
  429. There are a couple of other commands you need to know right at the beginning,
  430. not because they're particularly important in themselves, but because the
  431. output will look silly if you don't know them. First, you need to know how to
  432. put your own organisation's name and URL at the top of the report. For this,
  433. you need two commands such as
  434. <pre>
  435. HOSTNAME "Spam Widgets Inc."
  436. HOSTURL http://www.spam-widgets.com/
  437. </pre>
  438.  
  439. <p>
  440. If you have broken images in the output instead of graphs, you need to say in
  441. which directory on your server the images are stored. You do this by a
  442. command like
  443. <pre>
  444. IMAGEDIR /analog/images/
  445. </pre>
  446. (The images are distributed with the program - you will have to move them
  447. to whichever directory you choose.)
  448.  
  449. <hr>
  450. Next you will want to know how to turn individual reports on and off. Analog
  451. can produce 32 different reports, but here are the most important. Try them and
  452. see what happens. You can turn each report on with an <kbd>ON</kbd> command,
  453. or off with an <kbd>OFF</kbd> command. You can also use the commands <kbd>ALL
  454. ON</kbd> and <kbd>ALL OFF</kbd> to turn all reports on or off.
  455. <pre>
  456. MONTHLY ON       # one line for each month
  457. WEEKLY ON        # one line for each week
  458. FULLDAILY ON     # one line for each day
  459. DAILY ON         # one line for each day of the week
  460. HOURLY ON        # one line for each hour of the day
  461. GENERAL ON       # the General Summary at the top
  462. REQUEST ON       # which files were requested
  463. FAILURE ON       # which files were not found
  464. DIRECTORY ON     # Directory Report
  465. HOST ON          # which computers requested files
  466. ORGANISATION ON  # which organisations they were from
  467. DOMAIN ON        # which countries they were in
  468. REFERRER ON      # where people followed links from
  469. FAILREF ON       # where people followed broken links from
  470. SEARCHQUERY ON   # the phrases and words they used...
  471. SEARCHWORD ON    # ...to find you from search engines
  472. BROWSER ON       # which browsers people were using
  473. OSREP ON         # and which operating systems
  474. FILETYPE ON      # types of file requested
  475. SIZE ON          # sizes of files requested
  476. STATUS ON        # number of each type of success and failure
  477. </pre>
  478. The referrer and browser reports will only appear if your server records the
  479. necessary information. You can configure lots of other things about each
  480. report, such as how many rows are listed, which columns are included, and
  481. how the reports are sorted. For example, the command
  482. <pre>
  483. REQINCLUDE pages
  484. </pre>
  485. tells analog only to list pages, rather than all files, in the request report.
  486. You can read a summary of all the reports and the commands which control them
  487. in the section on <cite><a href="#reports">Analog's reports</a></cite>.
  488.  
  489. <hr>
  490. You can have the output in several different languages, by using a
  491. <kbd>LANGUAGE</kbd> command. For example, the command
  492. <pre>
  493. LANGUAGE FRENCH
  494. </pre>
  495. will give you the output in French. The available languages at the moment are
  496. <kbd>ARMENIAN</kbd>, <kbd>BOSNIAN</kbd>, <kbd>CATALAN</kbd>,
  497. <kbd>SIMP-CHINESE</kbd> (GB2312 encoding),
  498. <kbd>TRAD-CHINESE</kbd> (Big5 encoding),
  499. <kbd>CZECH</kbd>, <kbd>DANISH</kbd>, <kbd>DUTCH</kbd>,
  500. <kbd>ENGLISH</kbd>, <kbd>US-ENGLISH</kbd>, <kbd>FINNISH</kbd>,
  501. <kbd>FRENCH</kbd>, <kbd>GERMAN</kbd>, <kbd>GREEK</kbd>, <kbd>ITALIAN</kbd>,
  502. <kbd>JAPANESE</kbd>, <kbd>NORWEGIAN</kbd> (Bokmål),
  503. <kbd>NYNORSK</kbd>, <kbd>POLISH</kbd>, <kbd>PORTUGUESE</kbd>,
  504. <kbd>BR-PORTUGUESE</kbd>,
  505. <kbd>RUSSIAN</kbd>, <kbd>SERBIAN</kbd>, <kbd>SLOVAK</kbd>, <kbd>SLOVENE</kbd>,
  506. <kbd>SPANISH</kbd>, <kbd>SWEDISH</kbd>, <kbd>TURKISH</kbd> and
  507. <kbd>UKRAINIAN</kbd>.
  508. See the section on <cite><a href="#LANGUAGE">Configuring the
  509. output</a></cite> for how to download, or even translate, new languages.
  510.  
  511. <p><i>Note: The following additional languages were available in version 3
  512. of analog:
  513. <kbd>HUNGARIAN</kbd>, <kbd>ICELANDIC</kbd>,
  514. <kbd>KOREAN</kbd>, <kbd>LATVIAN</kbd>,
  515. <kbd>LITHUANIAN</kbd> and <kbd>ROMANIAN</kbd>.
  516. I hope that they will be available for this version soon. As they are
  517. translated, they will be added to the
  518. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>.
  519. Version 3 of analog will also be available at the
  520. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>
  521. for a while, if you need one of these languages.</i>
  522.  
  523. <hr>
  524. Two other common things you might want to do are to <i>alias</i> files or
  525. hosts (for example, to tell analog that two different filenames are really
  526. the same file), or to <i>include</i> or <i>exclude</i> certain files, hosts
  527. or dates (to ignore accesses from your site, for example, or to do an analysis
  528. only of a certain subdirectory or a certain time period. For these, see the
  529. later sections on <cite><a href="#alias">Aliases</a></cite> and
  530. <cite><a href="#include">Inclusions and exclusions</a></cite>.
  531.  
  532. <p>
  533. As I said, these are only a few of the commands available. To find out about
  534. all the commands, you'll have to read the remaining sections of the Readme,
  535. starting with a short section on the <a href="#syntax">syntax of
  536. configuration commands</a>.
  537.  
  538. <hr>
  539. <hr>
  540. <a name="syntax"><h2>Syntax of configuration commands</h2>
  541. </a>
  542. This section describes how analog finds configuration commands, and what the
  543. syntax of a configuration file should be. The syntax of individual commands is
  544. given in the <cite><a href="#quickref">Quick reference</a></cite> section
  545. later.
  546.  
  547. <hr>
  548. When analog starts up, it first reads options from configuration files
  549. and the command line (assuming that you are running analog from an operating
  550. system with a command line). Defaults for many of these options will have
  551. already been set in the files <kbd>anlghead.h</kbd> and <kbd>anlghea2.h</kbd>
  552. at the time the program
  553. was compiled. So if you compile your own version of analog, rather than
  554. downloading a pre-compiled executable, you can also set some options in
  555. those files before compiling. Those options are all documented there.
  556.  
  557. <hr>
  558. <a name="specialcfgs">The first file</a> which analog reads is the <i>default
  559. configuration file</i>,
  560. normally called <kbd>analog.cfg</kbd>. You can stop this file being read by
  561. specifying the option <kbd>-G</kbd> on the command line. Then the command line
  562. arguments are read, in the order in which they appear. Finally, the
  563. <i>mandatory configuration file</i> is read, if you specified one when you
  564. compiled the program. This is a configuration file which cannot be overridden
  565. by the user: if it is not found, analog exits immediately. This allows a
  566. system administrator to prevent users analysing certain files or producing
  567. certain reports, for example. <i><strong>However</strong></i>, note that the
  568. only certain way to prevent users analysing things is to deny them access to
  569. the logfile. Otherwise there is nothing to stop them analysing the logfile
  570. using another copy of analog or another program.
  571.  
  572. <hr>
  573. <a name="CONFIGFILE">You can include</a> another configuration file from the
  574. command line by using a
  575. command like <kbd>+gother.cfg</kbd>. (Note that there is no space between
  576. <kbd>+g</kbd> and the filename; this is true of all command line arguments.)
  577. You can also include another configuration file from within a configuration
  578. file by a command like
  579. <pre>
  580. CONFIGFILE other.cfg
  581. </pre>
  582. The commands in the other configuration file are read immediately, in order.
  583. The program then continues reading the command line or calling configuration
  584. file where it left off. Note that reading an alternative configuration file
  585. does <b>not</b> stop the default configuration file (usually
  586. <kbd>analog.cfg</kbd>) being read as well. To do that you have to specify
  587. <kbd>-G</kbd> as well as the <kbd>+g</kbd> command. Also, note that reading in
  588. several configuration files does <b>not</b> produce several reports, but a
  589. single report based on all the options.
  590.  
  591. <p>
  592. In the Mac version, you can start up a program with a particular configuration
  593. file instead of the default one by dragging the configuration file onto the
  594. analog icon. The file must start with a <kbd>#</kbd>.
  595.  
  596. <p>
  597. <a name="plusC">You can also</a> specify any configuration command on the
  598. command line even if it
  599. doesn't have a command line abbreviation, by use of the <kbd>+C</kbd> command.
  600. For example, <kbd>+C"UNCOMPRESS *.gz gzcat"</kbd> will include that command.
  601.  
  602. <hr>
  603. <a name="commandsyntax">Here are the syntax rules</a> for configuration
  604. commands. A configuration file
  605. contains several commands on separate lines; any text after a hash
  606. (<kbd>#</kbd>) on a line is ignored as a comment. Each command consists of
  607. the command name followed by one or two arguments. An argument to a command may
  608. optionally be placed in single or double quotes or parentheses, and it must be
  609. if the argument contains a hash or a space. So, for example, here are some
  610. valid configuration commands.
  611. <pre>
  612. DAILY      OFF   # We don't want a daily summary
  613. FULLDAILY  "ON"  # We want a full daily report instead 
  614. HOSTNAME (Spam Widgets Inc.)  # Spaces, so quotes or brackets needed
  615. </pre>
  616. Generally later commands override earlier ones if you can have only one of
  617. that thing (e.g., for the <kbd>OUTFILE</kbd>), or supplement them
  618. if you can have several (e.g., for the <kbd>LOGFILE</kbd>, because you can
  619. read several logfiles). Apart from that, the order of commands doesn't matter,
  620. except that <kbd><a href="#logfmt">LOGFORMAT</a></kbd>
  621. and <kbd><a href="#TIMEOFFSET">LOGTIMEOFFSET</a></kbd>
  622. commands must come earlier in the same configuration file than the
  623. <kbd>LOGFILE</kbd> to which they refer.
  624.  
  625. <hr>
  626. <a name="settings">If all the options</a> seem a bit confusing, just run
  627. <pre>
  628. analog -settings [other options]
  629. </pre>
  630. or include <kbd>SETTINGS ON</kbd> in the configuration commands.
  631. That will tell you what the values of all the variables will be, based on
  632. the defaults in <kbd>anlghead.h</kbd> and <kbd>anlghea2.h</kbd>, the
  633. configuration commands, and the
  634. command line options. If you're on Unix or Windows, remember that you can send
  635. the output to a file with
  636. <pre>
  637. analog -settings > file
  638. </pre>
  639.  
  640. <hr>
  641. <hr>
  642. <a name="logfile"><h2>Choosing a logfile</h2>
  643. </a>
  644. The basic command for selecting a logfile is
  645. <pre>
  646. LOGFILE logfilename
  647. </pre>
  648. or just to put the logfile name on the command line without any arguments,
  649. e.g., <kbd>analog logfilename</kbd>. A <kbd>-</kbd> sign or the word
  650. <kbd>stdin</kbd> is interpreted as standard input: this is useful on Unix
  651. systems for constructing pipes. All logfiles must be within your computer's
  652. file system (on disk, or at least mounted under Unix, or on a mapped drive
  653. under NT) -- analog won't use FTP or HTTP to fetch them from the internet.
  654. In the Mac version, you can also analyse a particular single logfile by
  655. dragging it onto the analog icon.
  656.  
  657. <p>
  658. You can have several <kbd>LOGFILE</kbd> commands. You can include wildcards in
  659. the logfile name (but not necessarily in the directory name: this is
  660. system-dependent), and you can use a list of logfiles separated by commas
  661. (without spaces). So the following commands would tell analog to read
  662. <kbd>logfile1</kbd>, <kbd>c:\logs\logfile2</kbd>, and all files ending in
  663. <kbd>.log</kbd>:
  664. <pre>
  665. LOGFILE logfile1,*.log
  666. LOGFILE c:\logs\logfile2
  667. </pre>
  668. Or if you were on a Mac, you might use something like
  669. <pre>
  670. LOGFILE "Hard Drive:Internet Applications:Analog:Logs:*"
  671. </pre>
  672. The <kbd>LOGFILE</kbd> commands are cumulative, except that any logfiles
  673. on the command line or in user-specified configuration files override any
  674. in the <a href="#specialcfgs">default configuration file</a>, and
  675. are themselves overridden by any in the
  676. <a href="#specialcfgs">mandatory configuration file</a>. There is
  677. also the special command
  678. <pre>
  679. LOGFILE none
  680. </pre>
  681. which erases the list of logfiles specified so far.
  682.  
  683. <hr>
  684. Analog knows about several different types of logfile. By default it will
  685. attempt to see if your logfile is of one of the types it knows about, based
  686. on the first line. The types it can usually diagnose are the common log
  687. format, the NCSA combined format, referrer log and browser log, the W3
  688. extended log format, the Microsoft IIS format, the Netscape format, the
  689. WebSTAR format and the WebSite format. <a href="#formats">Examples of all
  690. these formats</a> are given at the end of this section. If you have
  691. <a href="#debugs">debugging</a> on, analog will report what type of
  692. logfile it thinks yours is.
  693.  
  694. <p>
  695. If your logfile is not in one of the standard formats, you will probably still
  696. be OK, because it is possible to tell analog about other formats using a
  697. <kbd>LOGFORMAT</kbd> command. This is explained in the
  698. <a href="#logfmt">next section</a>. But most users don't
  699. ever need to know about this because they have logfiles in a standard
  700. format. So the best thing to do is just to try analysing your logfile and see
  701. if analog will understand it. If it does, you don't need to worry about
  702. <kbd>LOGFORMAT</kbd>s.
  703.  
  704. <p>
  705. <a name="corruptlines">If analog can't understand</a> your logfile, it will
  706. warn you that it can't detect
  707. the format, or possibly that it found a lot of corrupt lines. There are
  708. basically four reasons why this might happen:
  709. <ol>
  710.   <li>Some log formats are not very well designed and analog can't analyse
  711.       them reliably. In this case it will give up, usually with a helpful
  712.       message, rather than risk doing a bad job. For example, you might get
  713.       "<em>Logfile with ambiguous dates</em>" or "<em>Time
  714.       without date</em>." In this case you should read the
  715.       <a href="#formats">notes on all the built-in formats</a> below where
  716.       some common problems with those formats are described.
  717.   <li>Since analog tries to deduce the format based on the first line of the
  718.       logfile, it could just be that the first line is corrupt. In this case,
  719.       you could tell analog the format, or you could just fix the first line.
  720.   <li>For the same reason, if the format changes midway through the log,
  721.       analog will count the remaining lines as corrupt. In this case, you will
  722.       find that your report contains a partial analysis but with a large
  723.       number of corrupt lines too. You will need to give analog two
  724.       <kbd>LOGFORMAT</kbd> commands to tell it about the two different formats.
  725.   <li>Finally, some logfiles really aren't in one of the standard formats.
  726.       In this case you will need to <a href="#logfmt">read the next
  727.       section</a> and learn how to tell analog about your format.
  728. </ol>
  729.  
  730. <hr>
  731. <a name="secondarg">There's also a second argument</a> to the logfile command,
  732. which specifies a
  733. prefix to add to all the filenames in that logfile. This is useful if
  734. you've got several different servers or virtual hosts, when the same
  735. filename may occur on each of the servers. The argument can contain a
  736. <kbd>%v</kbd>, and the name of the virtual host will then be inserted at that
  737. point. For example,
  738. <pre>
  739. LOGFILE log1,log2 http://www.%v.mydomain.com
  740. </pre>
  741. would translate a filename <kbd>/file.html</kbd> with virtual host
  742. <kbd>host1</kbd> in <kbd>log1</kbd> or <kbd>log2</kbd> to
  743. <kbd>http://www.host1.mydomain.com/file.html</kbd>. If you are using the second
  744. argument to the <kbd>LOGFILE</kbd> command, you will probably want to use
  745. the <kbd><a href="#hierreps">SUBDIR</a></kbd> command as well.
  746.  
  747. <p>
  748. If <kbd>%v</kbd> is included in the argument and the logfile line
  749. doesn't have a virtual host, that line will be marked as corrupt. If
  750. <kbd><a href="#lowmem">VHOSTLOWMEM 3</a></kbd> is specified, the
  751. <kbd>%v</kbd>'s will not be translated and will just appear as <kbd>%v</kbd>
  752. in the output.
  753.  
  754.  
  755. <hr>
  756. <a name="UNCOMPRESS">It is often convenient</a> to store logfiles compressed
  757. to save disk space.
  758. Analog on the Mac can read logfiles compressed using gzip. And
  759. analog on Unix and Win32 can read compressed logfiles
  760. provided that you use an <kbd>UNCOMPRESS</kbd> command to say how to
  761. uncompress them. You need to supply the types of file that you want to
  762. uncompress in a comma-separated list, together with the name of a command that
  763. will uncompress the files to standard output (rather than to a file). For
  764. example, on Unix you might use
  765. <pre>
  766. UNCOMPRESS *.gz,*.Z  /usr/bin/gzcat
  767. </pre>
  768. whereas on Windows NT, you might use
  769. <pre>
  770. UNCOMPRESS *.gz ("c:\Program Files\gzip\gzip" -cd)
  771. </pre>
  772.  
  773. This would be a suitable command to include in the
  774. <a href="#specialcfgs">default configuration file</a>.
  775. <p>
  776. If analog determines when it starts to uncompress a logfile that that file
  777. isn't wanted for the analysis, two undesirable things can happen. Either the
  778. program might pause until the logfile is fully uncompressed, or there might be
  779. a "broken pipe" error reported. This is system dependent, and out
  780. of analog's control.
  781.  
  782. <hr>
  783. <h3><a name="formats">Logfile</a> formats</h3>
  784.  
  785. Here is a summary of the various logfile formats which analog knows about.
  786. To illustrate them, I have used the same (fictional) request as it might be
  787. recorded in the different formats.
  788.  
  789. <p>
  790. <a name="commonfmt">The common</a> logfile format is written by most
  791. servers. Its lines look like
  792. <pre>
  793. jay.bird.com - fred [25/Dec/1998:17:45:35 +0000]
  794. "GET /~sret1/ HTTP/1.0" 200 1243
  795. </pre>
  796. (except all on one line).
  797. Some versions of Microsoft software have a buggy version of this with an extra
  798. quote mark before the <kbd>HTTP</kbd> like this:
  799. <pre>
  800. jay.bird.com - fred [25/Dec/1998:17:45:35 +0000]
  801. "GET /~sret1/ "HTTP/1.0" 200 1243
  802. </pre>
  803. Analog will understand these, but (as with any two formats) it will reject
  804. lines if the format changes half way through.
  805.  
  806. <hr>
  807. <a name="reffmt">The NCSA referrer log</a> looks like
  808. <pre>
  809. [25/Dec/1998:17:45:35] http://www.site.com/ -> /~sret1/
  810. </pre>
  811. <a name="browfmt">and the browser (or agent) log</a> looks like
  812. <pre>
  813. [25/Dec/1998:17:45:35] Mozilla/2.0 (X11; I; HP-UX A.09.05)
  814. </pre>
  815. In the referrer log, the date can be omitted.
  816.  
  817. <hr>
  818. <a name="combinedfmt">The NCSA combined log</a> is the same as the common log,
  819. except that
  820. it has the referrer and browser on the end in quotes, like this:
  821. <pre>
  822. jay.bird.com - fred [25/Dec/1998:17:45:35 +0000] "GET /~sret1/ HTTP/1.0"
  823. 200 1243 "http://www.site.com/" "Mozilla/2.0 (X11; I; HP-UX A.09.05)"
  824. </pre>
  825. (except all one line). If you are using the Apache server, you can generate
  826. this with the <kbd>mod_log_config</kbd> module, using the command
  827. <pre>
  828. LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""
  829. </pre>
  830. It is usually better to use the combined log than separate logs, because it
  831. stores more information in less space.
  832.  
  833. <hr>
  834. <a name="IISfmt">The Microsoft IIS logfile</a> looks like
  835. <pre>
  836. 192.64.25.41, -, 25/12/98, 17:45:35, W3SVC1, HOST1, 192.16.225.10,
  837. 2178, 303, 1243, 200, 0, GET, /~sret1/, -,
  838. </pre>
  839. (except all on one line).
  840. However, the format is extremely badly designed, in that the date follows local
  841. conventions: in other words, in North America the above example would have the
  842. date <kbd>12/25/98</kbd> instead. Analog will diagnose which form the logfile
  843. is in if possible: but if both the date and the month are at most 12, there
  844. is no way to tell which format it is. In this case, it will advise you to use
  845. the command
  846. <kbd>LOGFORMAT MICROSOFT-NA</kbd> for North American date
  847. format, or <kbd>LOGFORMAT MICROSOFT-INT</kbd> for international date format.
  848. In some countries, the date will not be in either of these formats, in which
  849. case you need to write your own <kbd>LOGFORMAT</kbd> command.
  850. <p>
  851. There are also various third-party extensions to the Microsoft format to
  852. include, for example, the browser and referrer. But they all do it in
  853. different ways, so analog can't automatically diagnose them, and again, you
  854. need to write a <kbd>LOGFORMAT</kbd> command for them.
  855.  
  856. <hr>
  857. <a name="websitefmt">The WebSite format</a> looks like
  858. <pre>
  859. 12/25/98 17:45:35  jay.bird.com  host1  Server  fred  GET  /~sret1/
  860. http://www.site.com/    Mozilla/2.0 (X11; I; HP-UX A.09.05)  200  1243  2178
  861. </pre>
  862. (except all on one line, and with the fields separated by tabs). It suffers
  863. from the same problem with ambiguous dates as the IIS logfile (above), so
  864. again you might have to use <kbd>LOGFORMAT WEBSITE-NA</kbd> or <kbd>LOGFORMAT
  865. WEBSITE-INT</kbd>, or even have to write your own <kbd>LOGFORMAT</kbd> command.
  866.  
  867. <hr>
  868. <a name="restfmts">The W3 extended log</a>, the Netscape log, and the WebSTAR
  869. log can be recognised
  870. because they <b>must</b> include at or near the top a line telling analog
  871. what format to expect on subsequent lines. (They may also contain later lines
  872. changing the format). If the header line is missing, analog won't be able to
  873. interpret the subsequent lines and so won't be able to analyse the logfile. In
  874. this case, you will have to either replace the missing header or use a
  875. <kbd>LOGFORMAT</kbd> command to tell analog your format.
  876. <p>
  877. If analog finds that the header line is corrupt, it will usually tell you what
  878. was wrong with it. Here are two common problems. First, the header line musn't
  879. contain the same item twice, even under two different names. (This is because
  880. analog doesn't know which one you want to use.) If it does contain the same
  881. item twice, you will have to use a <kbd>LOGFORMAT</kbd> command to tell analog
  882. which one you want to ignore.
  883. <p>
  884. <a name="dateonly">Secondly</a>, you're not allowed the time without the date
  885. or vice
  886. versa -- in particular, having the date just at the top of the logfile is not
  887. sufficient; you must have it on each line. Microsoft servers produce extended
  888. logs with the date only at the top. But if the date changes during the
  889. logfile, the server doesn't then write a new date line. For this reason analog
  890. can't analyse such logfiles safely. There are some programs on the
  891. <a href="#helpers">helper applications page</a> to put the date on each 
  892. line. If you already have such a logfile you might want to use one of these
  893. programs, but they have to assume that the date doesn't change during the
  894. logfile, so it would be safer to tell your server to log in a better format in
  895. future.
  896. <p>
  897. <a name="extendedfmt">The extended log</a> is described at
  898. <a href="http://www.w3.org/TR/WD-logfile.html">http://www.w3.org/TR/WD-logfile.html</a>.
  899. Its header line looks like
  900. <pre>
  901. #Fields: date time cs-uri
  902. </pre>
  903. In the rest of the logfile, the fields can be separated by spaces or tabs.
  904. There is also Microsoft's attempt at the extended format -- unfortunately they
  905. didn't read the spec., so they didn't enclose the browser and referrer in
  906. quotes, they replaced spaces in the browser name with <kbd>+</kbd>'s, and they
  907. put the time taken to serve the request in milliseconds instead of seconds.
  908. Extended logs always record the time in GMT, so you will probably need to use a
  909. <kbd><a href="#TIMEOFFSET">LOGTIMEOFFSET</a></kbd> command to
  910. convert to your local timezone.
  911. <p>
  912. <a name="webstarfmt">The WebSTAR format</a> is described at <a href="http://www.starnine.com/webstar/docs/ws4manual.3f.html">http://www.starnine.com/webstar/docs/ws4manual.3f.html</a>.
  913. It has a header line like
  914. <pre>
  915. !!LOG_FORMAT DATE TIME RESULT URL BYTES_SENT HOSTNAME
  916. </pre>
  917. In the rest of the logfile, the fields are separated by tabs. The WebSTAR
  918. server also records the time in GMT, so again you will probably need to use a
  919. <kbd><a href="#TIMEOFFSET">LOGTIMEOFFSET</a></kbd> command to
  920. convert to your local timezone. Some other Mac servers also use the WebSTAR
  921. format, or something looking like it. Analog will understand these too.
  922. <p>
  923. <a name="netscapefmt">Finally, the Netscape</a> header line looks like
  924. <pre>
  925. format=%Ses->client.ip% [%SYSDATE%] "%Req->reqpb.clf-request%"
  926. %Req->srvhdrs.clf-status% %Req->srvhdrs.content-length%
  927. </pre>
  928.  
  929. <hr>
  930. <hr>
  931. <a name="logfmt"><h2>Specifying a log format</h2>
  932. </a>
  933. This section is about how to tell analog the format of your logfile. I'll
  934. assume that you've read the <a href="#logfile">previous section</a>, and
  935. have decided that you need to specify the log format explicitly, because
  936. analog can't detect the format of your logfile itself for some reason.
  937.  
  938. <p>
  939. The basic command to specify a log format looks like
  940. <pre>
  941. LOGFORMAT format
  942. </pre>
  943. -- we'll discuss what the formats can be in a minute. Or if you are using the
  944. Apache server, you will probably find it more convenient to use
  945. <pre>
  946. APACHELOGFORMAT format
  947. </pre>
  948. instead.
  949. <p>
  950. The <kbd>LOGFORMAT</kbd> and <kbd>APACHELOGFORMAT</kbd>
  951. commands only apply to logfiles specified with a <kbd>LOGFILE</kbd> command
  952. <em>later</em> in the <em>same</em> configuration file. So you must put the
  953. <kbd>LOGFORMAT</kbd> above the <kbd>LOGFILE</kbd> to which it refers. This
  954. way, different logfiles can have different formats, like this:
  955. <pre>
  956. LOGFILE log0
  957. LOGFORMAT format1
  958. LOGFILE log1
  959. LOGFORMAT format2
  960. LOGFILE log2
  961. LOGFILE log3
  962. </pre>
  963. In this example, <kbd>log1</kbd> is in <kbd>format1</kbd>, <kbd>log2</kbd> and
  964. <kbd>log3</kbd> are in <kbd>format2</kbd>, and <kbd>log0</kbd> isn't in either
  965. format -- analog will try and detect which format it's in.
  966.  
  967. <hr>
  968. <a name="Apache">The <kbd>APACHELOGFORMAT</kbd> command</a> is followed by the
  969. <kbd>LogFormat</kbd> from your Apache <kbd>httpd.conf</kbd> file. For example,
  970. common format could be represented by 
  971. <pre>
  972. APACHELOGFORMAT (%h %l %u %t \"%r\" %s %b)
  973. </pre>
  974. (The parentheses are needed because the argument contains spaces.) Analog
  975. understands all Apache log formats, with the exception that it won't parse
  976. Apache's <kbd>"%...{format}t"</kbd> construction for customised
  977. times: if you have this construction, you will have to use ordinary
  978. <kbd>LOGFORMAT</kbd> instead.
  979.  
  980. <hr>
  981. <a name="fmtsyntax">The possible formats</a> for use with the
  982. <kbd>LOGFORMAT</kbd> command are of two
  983. types. First there are some symbolic words, and then there are <i>log format
  984. strings</i>. We'll look at the words first.
  985.  
  986. <p>
  987. <a name="fmtwords">There are format words</a> for all the built-in formats
  988. analog knows about.
  989. You might need one of these words if your logfile is in a standard format, but
  990. analog can't detect which format it's in for some reason; for example, maybe
  991. the first line is corrupt; or maybe analog can't tell whether you're using
  992. North American or international dates. So for example
  993. <pre>
  994. LOGFORMAT COMMON
  995. </pre>
  996. will select common format; you can also have <kbd>COMBINED</kbd>,
  997. <kbd>REFERRER</kbd>, <kbd>BROWSER</kbd>, <kbd>EXTENDED</kbd>,
  998. <kbd>MICROSOFT-NA</kbd> (North American date format),
  999. <kbd>MICROSOFT-INT</kbd> (international date format),
  1000. <kbd>WEBSITE-NA</kbd>, <kbd>WEBSITE-INT</kbd>,
  1001. <kbd>MS-EXTENDED</kbd> (Microsoft's attempt at extended format),
  1002. <kbd>MS-COMMON</kbd> (a buggy version of common format in some versions
  1003. of Microsoft software), <kbd>NETSCAPE</kbd> or <kbd>WEBSTAR</kbd>. All these
  1004. formats were defined at the end of the <a href="#formats">previous
  1005. section</a>. You can also use the special word <kbd>AUTO</kbd> to return to
  1006. automatic detection.
  1007.  
  1008. <p>
  1009. <a name="fmtstrings">If your logfile</a> is not in one of the recognised
  1010. formats, you can tell analog
  1011. about your format using a log format string. You only ever need this if your
  1012. logfile has lines which are not in one of the standard formats. (And even if it
  1013. isn't in a standard format, if you're using the Apache web server, you will
  1014. find <kbd><a href="#Apache">APACHELOGFORMAT</a></kbd> easier.)
  1015. <p>
  1016. The format string consists of a template for the logfile line, with the
  1017. various fields and special characters replaced by codes as follows. Please
  1018. note that these codes are case sensitive -- for example, <kbd>%b</kbd> is
  1019. completely different from <kbd>%B</kbd>!
  1020. <dl compact>
  1021.   <dt><kbd>%S</kbd><dd>host (computer making the request)
  1022.   <dt><kbd>%r</kbd><dd>file requested
  1023.   <dt><kbd>%B</kbd><dd>browser
  1024.   <dt><kbd>%A</kbd><dd>browser with <kbd>+</kbd>'s instead of spaces
  1025.   <dt><kbd>%f</kbd><dd>referrer (URL referring to the file)
  1026.   <dt><kbd>%u</kbd><dd>user (tip: a cookie can usefully be defined as
  1027.       <kbd>%u</kbd> too)
  1028.   <dt><kbd>%v</kbd><dd>virtual host (also called virtual domain)
  1029.   <dt><kbd>%d</kbd><dd>day of the month
  1030.   <dt><kbd>%m</kbd><dd>month in digits
  1031.   <dt><kbd>%M</kbd><dd>month, three letter English abbreviation
  1032.   <dt><kbd>%y</kbd><dd>year, last two digits
  1033.   <dt><kbd>%Y</kbd><dd>year, four digits
  1034.   <dt><kbd>%h</kbd><dd>hour of the day
  1035.   <dt><kbd>%n</kbd><dd>minute of the hour
  1036.   <dt><kbd>%a</kbd><dd><kbd>a</kbd> or <kbd>A</kbd> for am, or <kbd>p</kbd> or
  1037.       <kbd>P</kbd> for pm, if <kbd>%h</kbd> is in the 12-hour clock. (So to
  1038.       match "am" you need <kbd>%am</kbd> and to match "AM"
  1039.       you need <kbd>%aM</kbd>)
  1040.   <dt><kbd>%U</kbd><dd>"Unix time" (seconds since beginning of 1970, GMT)
  1041.   <dt><kbd>%b</kbd><dd>number of bytes transferred
  1042.   <dt><kbd>%t</kbd><dd>processing time in seconds
  1043.   <dt><kbd>%T</kbd><dd>processing time in milliseconds
  1044.   <dt><kbd>%c</kbd><dd>HTTP status code
  1045.   <dt><kbd>%q</kbd><dd>query string (part of filename after <kbd>?</kbd>, if
  1046.       recorded in a separate field)
  1047.   <dt><kbd>%j</kbd><dd>junk: ignore this field (field can be empty too)
  1048.   <dt><kbd>%w</kbd><dd>white space: spaces or tabs
  1049.   <dt><kbd>%W</kbd><dd>optional white space
  1050.   <dt><kbd>%%</kbd><dd><kbd>%</kbd> sign
  1051.   <dt><kbd>\n</kbd><dd>new line
  1052.   <dt><kbd>\t</kbd><dd>tab stop
  1053.   <dt><kbd>\\</kbd><dd>single backslash
  1054. </dl>
  1055. So for example, the common log format, which looks like
  1056. <pre>
  1057. jay.bird.com - fred [25/Dec/1998:17:45:35 +0000]
  1058. "GET /~sret1/ HTTP/1.0" 200 1243
  1059. </pre>
  1060. (except all on one line)
  1061. could be represented by the <kbd>LOGFORMAT</kbd> command
  1062. <pre>
  1063. LOGFORMAT (%S - %u [%d/%M/%Y:%h:%n:%j %j] "%j %r %j" %c %b)
  1064. </pre>
  1065. In other words, it's just the sample line but with the hostname replaced by
  1066. <kbd>%S</kbd>, the username by <kbd>%u</kbd> etc.
  1067. (The parentheses are needed because the argument contains spaces.)
  1068. Or take another example: if you had lines which looked like
  1069. <pre>
  1070. Fri 25/12/98 5:45pm, /~sret1/, jay.bird.com, 200, 1243,
  1071. http://www.site.com, Mozilla/2.0 (X11; I; HP-UX A.09.05)
  1072. </pre>
  1073. (all on one line again), you could use the format
  1074. <pre>
  1075. LOGFORMAT (%j %d/%m/%y %h:%n%am, %r, %S, %c, %b, %f, %B)
  1076. </pre>
  1077. <hr>
  1078. A logfile can sometimes have lines in several different formats. So you can
  1079. specify several <kbd>LOGFORMAT</kbd> commands in a row, and they will all
  1080. apply to the next logfile. This is also useful if the format of your logfile
  1081. changes half way through. So in this example:
  1082. <pre>
  1083. LOGFORMAT COMMON
  1084. LOGFORMAT COMBINED
  1085. LOGFILE log1
  1086. LOGFORMAT (%j %d/%m/%y %h:%n%am, %r, %S, %c, %b, %f, %B)
  1087. LOGFILE log2
  1088. LOGFILE log3
  1089. </pre>
  1090. <kbd>log1</kbd> has lines in both common and combined format, whereas
  1091. <kbd>log2</kbd> and <kbd>log3</kbd> have lines just in the format in the
  1092. previous example.
  1093. <p>
  1094. If you specify several formats, analog tries to match each line to the first
  1095. format first, then if that fails the next, and so on, so the order of the
  1096. formats is important. Usually you want to specify the most common one
  1097. first, to minimise the time spent trying to match lines to inappropriate
  1098. formats. 
  1099.  
  1100. <hr>
  1101. <a name="DEFAULTLOGFORMAT">I suggested above</a> that any logfile which
  1102. doesn't have a <kbd>LOGFORMAT</kbd>
  1103. command earlier in the same configuration file is auto-detected. But this
  1104. isn't quite true. Actually such logfiles get a special format called the
  1105. <em>default log format</em>. The default format starts off as auto-detection,
  1106. but you can change it if you want with the <kbd>DEFAULTLOGFORMAT</kbd>
  1107. command. This command works exactly the same as the <kbd>LOGFORMAT</kbd>
  1108. command -- it understands the same formats, and if you have several
  1109. <kbd>DEFAULTLOGFORMAT</kbd> commands, they accumulate in the same way. The
  1110. difference is that they don't need to be put in any particular place. (There
  1111. is also <kbd>APACHEDEFAULTLOGFORMAT</kbd>, which has the same effect but uses
  1112. the Apache LogFormat strings.)
  1113. <p>
  1114. So let's go back to the first example:
  1115. <pre>
  1116. LOGFILE log0
  1117. LOGFORMAT format1
  1118. LOGFILE log1
  1119. LOGFORMAT format2
  1120. LOGFILE log2
  1121. LOGFILE log3
  1122. </pre>
  1123. Here <kbd>log0</kbd> actually gets the default log format. If there are no
  1124. <kbd>DEFAULTLOGFORMAT</kbd> commands, the default will be auto-detection. But
  1125. if there are <kbd>DEFAULTLOGFORMAT</kbd> commands, even in another
  1126. configuration file, that will be the format of <kbd>log0</kbd>.
  1127. <p>
  1128. The times you need to use the <kbd>DEFAULTLOGFORMAT</kbd> instead of the
  1129. <kbd>LOGFORMAT</kbd> are if you want to change the format of logfiles which
  1130. aren't given in a <kbd>LOGFILE</kbd> command -- for example, ones specified on
  1131. the command line, or dragged onto the program icon on a Mac, or compiled in.
  1132. It is also useful to use the <kbd>DEFAULTLOGFORMAT</kbd> if your logfiles are
  1133. always in the same format, so that you don't have to worry about putting in
  1134. enough <kbd>LOGFORMAT</kbd>s in the right places.
  1135.  
  1136. <hr>
  1137. <a name="fmtmisc">A couple more technical details</a> and tips about
  1138. <kbd>LOGFORMAT</kbd> commands.
  1139.  
  1140. <p>
  1141. The "Unix time", <kbd>%U</kbd>, is always recorded in GMT. So you
  1142. will probably need to use a
  1143. <kbd><a href="#TIMEOFFSET">LOGTIMEOFFSET</a></kbd>
  1144. command to convert to your local timezone. Also, it's just the integer part of
  1145. the time, so if you have decimals you will have to use <kbd>%U.%j</kbd> .
  1146.  
  1147. <p>
  1148. The log formats which analog can handle are those which are known as
  1149. <i>instantaneously decipherable</i>: in practice, this means that the character
  1150. which terminates a string can never occur in the string. So for example, in
  1151. common format, which looks like
  1152. <pre>
  1153. LOGFORMAT (%S - %u [%d/%M/%Y:%h:%n:%j %j] "%j %r %j" %c %b)
  1154. </pre>
  1155. if the hostname ever contained a space, the line would be marked as corrupt,
  1156. because analog terminates the host at the first space, <em>not</em> at the
  1157. first occurrence of space-dash-space, and then the rest of the line wouldn't
  1158. match. Of course, hostnames should never contain spaces, so this shouldn't be a
  1159. problem. There are a couple of other restrictions: if there is any date or
  1160. time information, then the year, month, date, hour and minute must all be
  1161. present: and the same information may not occur twice in the format (so you
  1162. can't have both <kbd>%m</kbd> and <kbd>%M</kbd>, for example, because these
  1163. both represent the month; make one of them a <kbd>%j</kbd> to have it ignored).
  1164.  
  1165. <p>
  1166. <a name="starredfmt">Sometimes</a> you need to read one of the fields in a
  1167. logfile, but not analyse it.
  1168. For example, if you have a separate common log and referrer log, the referrer
  1169. log might look like
  1170. <pre>
  1171. http://guide-p.infoseek.com/Titles -> /~sret1/analog/
  1172. </pre>
  1173. But the requests for <kbd>/~sret1/analog/</kbd> would already have been
  1174. counted when reading the main logfile, so you don't want to count them again
  1175. now. You get round this by specifying a <kbd>*</kbd> in that item in the
  1176. format string, like this:
  1177. <pre>
  1178. LOGFORMAT (%f -> %*r)
  1179. </pre>
  1180.  
  1181. <p>
  1182. A tip: sometimes it is more efficient to specify two or more adjacent fields
  1183. to ignore with a single <kbd>%j</kbd>, as long as the whole group ends with a
  1184. recognisable character. So common format is more efficiently specified as
  1185. <pre>
  1186. LOGFORMAT (%S - %u [%d/%M/%Y:%h:%n:%j] "%j %r %j" %c %b)
  1187. </pre>
  1188. -- in the date and time <kbd>[25/Dec/1998:17:45:35 +0000]</kbd>, the seconds
  1189. and the timezone can be ignored with a single <kbd>%j</kbd>, extending until
  1190. the close-bracket.
  1191.  
  1192. <p>
  1193. Another tip: <kbd>%j</kbd> can also be used to ignore whole lines, rather than
  1194. just fields analog doesn't use. For example, the extended log format ignores
  1195. lines beginning with <kbd>#</kbd> by using
  1196. <pre>
  1197. LOGFORMAT #%j
  1198. </pre>
  1199. and the Microsoft format ignore lines corresponding to FTP requests with
  1200. <pre>
  1201. LOGFORMAT (%*S, %*u, %m/%d/%y, %h:%n:%j, %j)
  1202. </pre>
  1203. If those formats had not been used, the lines would have been incorrectly
  1204. marked as corrupt.
  1205. <hr>
  1206. <a name="fmtexamples">Finally</a>, both for reference and as examples, here is
  1207. a list of all the fixed formats that analog understands, together with the
  1208. example lines from the <a href="#formats">previous section</a>
  1209. and their built-in definitions (split over two lines where necessary).
  1210. <dl>
  1211.   <dt><a name="commonfmtex">Common format</a>, <kbd>LOGFORMAT COMMON</kbd>
  1212.   <dd><pre>
  1213. jay.bird.com - fred [25/Dec/1998:17:45:35 +0000]
  1214.       "GET /~sret1/ HTTP/1.0" 200 1243
  1215. LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r%wHTTP%j" %c %b)
  1216. LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r" %c %b)
  1217. </pre>
  1218.   <dt><a name="mscommonfmtex">Microsoft common format</a>,
  1219.       <kbd>LOGFORMAT MS-COMMON</kbd>
  1220.   <dd><pre>
  1221. jay.bird.com - fred [25/Dec/1998:17:45:35 +0000]
  1222.       "GET /~sret1/ "HTTP/1.0" 200 1243
  1223. LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r%w"HTTP%j" %c %b)
  1224. LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r" %c %b)
  1225. </pre>
  1226.   <dt><a name="combinedfmtex">Combined log</a>, <kbd>LOGFORMAT COMBINED</kbd>
  1227.   <dd><pre>
  1228. jay.bird.com - fred [25/Dec/1998:17:45:35 +0000] "GET /~sret1/ HTTP/1.0" 200
  1229.       1243 "http://www.site.com/" "Mozilla/2.0 (X11; I; HP-UX A.09.05)"
  1230. LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r%wHTTP%j" %c %b "%f" "%B")
  1231. LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r" %c %b "%f" "%B")
  1232. </pre>
  1233.   <dt><a name="reffmtex">Referrer log</a>, <kbd>LOGFORMAT REFERRER</kbd>
  1234.   <dd><pre>
  1235. [25/Dec/1998:17:45:35] http://www.site.com/ -> /~sret1/
  1236. <i>or</i> http://www.site.com/ -> /~sret1/
  1237. LOGFORMAT ([%d/%M/%Y:%h:%n:%j] %f -> %*r)
  1238. LOGFORMAT (%f -> %*r)
  1239. </pre>
  1240.   <dt><a name="browfmtex">Browser log</a>, <kbd>LOGFORMAT BROWSER</kbd>
  1241.   <dd><pre>
  1242. [25/Dec/1998:17:45:35] Mozilla/2.0 (X11; I; HP-UX A.09.05)
  1243. LOGFORMAT ([%d/%M/%Y:%h:%n:%j] %B)
  1244. </pre>
  1245.   <dt><a name="msnafmtex">Microsoft log, North American dates</a>,
  1246.       <kbd>LOGFORMAT MICROSOFT-NA</kbd>
  1247.   <dd><pre>
  1248. 192.64.25.41, -, 12/25/98, 17:45:35, W3SVC1, HOST1, 192.16.225.10,
  1249.       2178, 303, 1243, 200, 0, GET, /~sret1/, -,
  1250. LOGFORMAT (%S, %u, %m/%d/%y, %h:%n:%j, W3SVC%j, %j, %v,
  1251.       %T, %j, %b, %c, %j, %j, %r, %q,)
  1252. LOGFORMAT (%*S, %*u, %m/%d/%y, %h:%n:%j, %j)
  1253. </pre>
  1254.   <dt><a name="msintfmtex">Microsoft log, international dates</a>,
  1255.       <kbd>LOGFORMAT MICROSOFT-INT</kbd>
  1256.   <dd><pre>
  1257. 192.64.25.41, -, 25/12/98, 17:45:35, W3SVC1, HOST1, 192.16.225.10,
  1258.       2178, 303, 1243, 200, 0, GET, /~sret1/, -,
  1259. LOGFORMAT (%S, %u, %d/%m/%y, %h:%n:%j, W3SVC%j, %j, %v,
  1260.       %T, %j, %b, %c, %j, %j, %r, %q,)
  1261. LOGFORMAT (%*S, %*u, %d/%m/%y, %h:%n:%j, %j)
  1262. </pre>
  1263.   <dt><a name="websitena">WebSite log, North American dates</a>,
  1264.       <kbd>LOGFORMAT WEBSITE-NA</kbd>
  1265.   <dd><pre>
  1266. 12/25/98 17:45:35  jay.bird.com  host1  Server  fred  GET  /~sret1/
  1267.    http://www.site.com/    Mozilla/2.0 (X11; I; HP-UX A.09.05)  200  1243  2178
  1268. LOGFORMAT (%m/%d/%y %h:%n:%j\t%S\t%v\t%j\t%u\t%j\t%r\t%f\t%j\t%B\t%c\t%b\t%T)
  1269. </pre>
  1270.   <dt><a name="websiteint">WebSite log, international dates</a>,
  1271.       <kbd>LOGFORMAT WEBSITE-INT</kbd>
  1272.   <dd><pre>
  1273. 25/12/98 17:45:35  jay.bird.com  host1  Server  fred  GET  /~sret1/
  1274.    http://www.site.com/    Mozilla/2.0 (X11; I; HP-UX A.09.05)  200  1243  2178
  1275. LOGFORMAT (%d/%m/%y %h:%n:%j\t%S\t%v\t%j\t%u\t%j\t%r\t%f\t%j\t%B\t%c\t%b\t%T)
  1276. </pre>
  1277. </dl>
  1278. The extended log, Netscape log and WebSTAR log don't have any built-in
  1279. formats: analog constructs their formats from their header lines.
  1280. <hr>
  1281. <hr>
  1282. <a name="alias"><h2>Aliases</h2>
  1283. </a>
  1284. <a name="CASE">After</a> analog has read each logfile entry, it then applies
  1285. aliases to each
  1286. of the items. First, if you have a case insensitive filesystem, analog
  1287. converts the filename to lower case. Usually analog assumes that Unix and BeOS
  1288. filesystems are case sensitive and other systems are case insensitive. You
  1289. might want to override its choice, if, for example, you have transferred files
  1290. from one machine to another, so as to use the convention on the original
  1291. machine. You can do this by the commands
  1292. <pre>
  1293. CASE INSENSITIVE
  1294. CASE SENSITIVE
  1295. </pre>
  1296. There are similar commands for usernames, if your logfile records these. By
  1297. default, usernames are always case insensitive, but you can specify
  1298. <pre>
  1299. USERCASE SENSITIVE
  1300. </pre>
  1301. to override this.
  1302.  
  1303. <hr>
  1304. <a name="DIRSUFFIX">Next it</a> applies built-in aliases to each item. For
  1305. example, it knows that
  1306. <kbd>%7E</kbd> in a filename or referrer is equivalent to <kbd>~</kbd> and
  1307. translates it accordingly. It also strips off the directory suffix from any
  1308. filenames which have it. This suffix is normally <kbd>index.html</kbd>, but
  1309. you can specify another one instead with a command such as
  1310. <pre>
  1311. DIRSUFFIX default.htm
  1312. </pre>
  1313. (You can only have one <kbd>DIRSUFFIX</kbd>.) There are other built-in
  1314. aliases for other items: for example, hostnames are converted to lower case
  1315. at this point.
  1316.  
  1317. <hr>
  1318. <a name="useraliases">After this</a>, it applies user-specified aliases to
  1319. each item. These aliases are
  1320. useful if, for example, you know that two filenames correspond to the same
  1321. file, or if you want to translate local hostnames to their internet
  1322. equivalents. You specify aliases by commands like
  1323. <pre>
  1324. FILEALIAS /football.html /soccer.html
  1325. HOSTALIAS lion lion.statslab.cam.ac.uk
  1326. </pre>
  1327. There is also the special command <kbd>FILEALIAS none</kbd>, which cancels
  1328. any other file aliases which might have been specified.
  1329.  
  1330. <p>
  1331. The alias commands for the other items are called <kbd>BROWALIAS</kbd>,
  1332. <kbd>REFALIAS</kbd>, <kbd>USERALIAS</kbd> and <kbd>VHOSTALIAS</kbd>.
  1333. Only one alias is ever applied to any item. So after
  1334. <pre>
  1335. FILEALIAS /football.html /soccer.html
  1336. FILEALIAS /soccer.html /brazil.html
  1337. </pre>
  1338. the file <kbd>/soccer.html</kbd> would get translated to
  1339. <kbd>/brazil.html</kbd>, but <kbd>/football.html</kbd> would only get
  1340. translated to <kbd>/soccer.html</kbd> and would not see the second alias.
  1341. <p>
  1342. You can also use wildcards (<kbd>?</kbd> and <kbd>*</kbd>) in alias commands.
  1343. And on the right-hand side, you can use <kbd>$1</kbd>, <kbd>$2</kbd> etc. to
  1344. represent the parts of the original name matched by the <kbd>*</kbd>'s. (You
  1345. can use <kbd>$$</kbd> to get an actual <kbd>$</kbd> on the right-hand side.)
  1346. As a special abbreviation, if there is exactly one <kbd>*</kbd> on the
  1347. left-hand side, then a <kbd>*</kbd> on the right-hand side can be used to
  1348. represent <kbd>$1</kbd>. So, for example,
  1349. <pre>
  1350. FILEALIAS /*/football/* /soccer/
  1351. </pre>
  1352. would translate <kbd>/sport/football/rules.html</kbd> to just
  1353. <kbd>/soccer/</kbd>, but either of
  1354. <pre>
  1355. FILEALIAS /*/football/* /$1/soccer/$2         # or
  1356. FILEALIAS /sport/football/* /sport/soccer/*
  1357. </pre>
  1358. would translate <kbd>/sport/football/rules.html</kbd> to
  1359. <kbd>/sport/soccer/rules.html</kbd>.
  1360. <p>
  1361. Analog's <kbd>*</kbd>'s are un-greedy: if there are two possible ways of
  1362. matching, the part of the expression on the left matches as little as
  1363. possible. This is more often what you want. But it contrasts with Perl's
  1364. regular expressions, for example. (Oh, two consecutive <kbd>*</kbd>'s are
  1365. completely useless, but if you try it they are collapsed into one before
  1366. counting the <kbd>$1</kbd>, <kbd>$2</kbd>, etc.)
  1367. <p>
  1368. The behaviour of <kbd>FILEALIAS</kbd> and <kbd>REFALIAS</kbd> can be
  1369. slightly unintuitive if the file has <a href="#unintuitive">search
  1370. arguments</a>.
  1371. <p>
  1372. A warning to Unix users: if you put an <kbd>ALIAS</kbd> command on the
  1373. command line with <kbd><a href="#plusC">+C</a></kbd>, the shell
  1374. may try and expand <kbd>$1</kbd> etc., which is not what you want. To stop
  1375. the shell doing this, put the command in single quotes instead of double
  1376. quotes.
  1377. <hr>
  1378. <a name="OUTPUTALIAS">There is another set</a> of alias commands, called
  1379. <i>output aliases</i>. There
  1380. is one of these for each of the reports, except the time reports. Instead of
  1381. acting on items when the logfile is being read, they act on individual lines
  1382. in the output. So for example, the command
  1383. <pre>
  1384. TYPEOUTPUTALIAS .txt ".txt (Plain text files)"
  1385. </pre>
  1386. would provide an explanation of that line in the file type report.
  1387.  
  1388. <p>
  1389. There can be some confusion between some <kbd>ALIAS</kbd> and
  1390. <kbd>OUTPUTALIAS</kbd> commands. For example, what is the difference between
  1391. <kbd>HOSTALIAS</kbd> and <kbd>HOSTOUTPUTALIAS</kbd>? In fact, there are
  1392. several differences, resulting from the different times at which the aliases
  1393. are processed. The <kbd>HOSTALIAS</kbd> applies to the host <i>items</i>, but
  1394. the <kbd>HOSTOUTPUTALIAS</kbd> only applies to the <i>lines in the host
  1395. report</i>. This means that the <kbd>HOSTALIAS</kbd> also affects the other
  1396. reports which use the hosts, such as the domain report, whereas the
  1397. <kbd>HOSTOUTPUTALIAS</kbd> only affects the host report. Also the
  1398. <kbd>HOSTOUTPUTALIAS</kbd> applies separately to each line of the host
  1399. report. This means that if two separate hosts translate to the same thing in a
  1400. <kbd>HOSTALIAS</kbd> command, they will become one host ever after. But if one
  1401. were to use the same <kbd>HOSTOUTPUTALIAS</kbd> commands, there would be two
  1402. hosts, which would just happen to have the same name in one report.
  1403.  
  1404. <p>
  1405. In summary, <kbd>HOSTALIAS</kbd> would normally be used if a single host had
  1406. two different names, so might otherwise appear to be two hosts, whereas
  1407. <kbd>HOSTOUTPUTALIAS</kbd> would normally be used to annotate or clarify the
  1408. host report.
  1409. <p>
  1410. The full list of output aliases is <kbd>REQOUTPUTALIAS</kbd>,
  1411. <kbd>REDIROUTPUTALIAS</kbd>, <kbd>FAILOUTPUTALIAS</kbd>,
  1412. <kbd>TYPEOUTPUTALIAS</kbd>, <kbd>DIROUTPUTALIAS</kbd>,
  1413. <kbd>HOSTOUTPUTALIAS</kbd>, <kbd>DOMOUTPUTALIAS</kbd>,
  1414. <kbd>ORGOUTPUTALIAS</kbd>,
  1415. <kbd>REFOUTPUTALIAS</kbd>, <kbd>REFSITEOUTPUTALIAS</kbd>,
  1416. <kbd>REDIRREFOUTPUTALIAS</kbd>, <kbd>FAILREFOUTPUTALIAS</kbd>,
  1417. <kbd>BROWOUTPUTALIAS</kbd>, <kbd>FULLBROWOUTPUTALIAS</kbd>,
  1418. <kbd>OSOUTPUTALIAS</kbd>,
  1419. <kbd>VHOSTOUTPUTALIAS</kbd>, <kbd>USEROUTPUTALIAS</kbd> and
  1420. <kbd>FAILUSEROUTPUTALIAS</kbd>.
  1421. <p>
  1422. There is one known bug with <kbd>OUTPUTALIAS</kbd>. The report is sorted
  1423. before the <kbd>OUTPUTALIAS</kbd> is applied. This means that if the
  1424. <kbd><a href="#SORTBY">SORTBY</a></kbd> for the report is set to
  1425. <kbd>ALPHABETICAL</kbd>, then the report will not be sorted correctly.
  1426. <hr>
  1427. <a name="aliasregexp">If you have an operating system</a> with regular
  1428. expressions (only Unix??) you can include them in the <kbd>ALIAS</kbd>
  1429. commands. Otherwise you might as well go straight on to the
  1430. <a href="#include">next section</a>.
  1431. <p>
  1432. Sorry, I'm not going to teach you how to use regular expressions
  1433. here if you don't already know: if you're on Unix try typing <kbd>man
  1434. regex</kbd> or <kbd>man grep</kbd>. There are lots of implementations of
  1435. regular expressions. The ones which analog uses are POSIX extended regular
  1436. expressions, as in Unix <kbd>egrep</kbd>. If you're familiar with regular
  1437. expressions from Perl, or even from GNU <kbd>grep -E</kbd>, you will not
  1438. find all the same features here.
  1439. <p>
  1440. You include regular expressions in an <kbd>ALIAS</kbd> command by prefixing
  1441. the left-hand side of the alias with "<kbd>REGEXP:</kbd>". Or you can
  1442. specify a case-insensitive match, like Unix <kbd>egrep -i</kbd>, by using
  1443. "<kbd>REGEXPI:</kbd>". (It's automatically case-insensitive for many
  1444. items, such as hostnames, or filenames if you have specified
  1445. <kbd><a href="#CASE">CASE INSENSITIVE</a></kbd>.)
  1446. <p>
  1447. On the
  1448. right-hand side of the alias you can use <kbd>$1</kbd>, <kbd>$2</kbd> etc. to
  1449. represent the first, second etc. bracketed expression on the left-hand side,
  1450. counting in order of the left brackets. (Again, you can't put <kbd>$1</kbd>,
  1451. <kbd>$2</kbd> etc. on the command line unless you put them in single quotes.)
  1452. <p>
  1453. Regular expressions match if they match just part of the string. If you want
  1454. them to have to match the whole of the string, you have to anchor them to the
  1455. ends of the string with <kbd>^</kbd> and <kbd>$</kbd>.
  1456. <p>
  1457. For example,
  1458. <pre>
  1459. REQOUTPUTALIAS REGEXP:^(/~([^/]*).*) "[$2] $1"
  1460. </pre>
  1461. would translate <pre>  /~sret1/backgammon/rules.html</pre> to
  1462. <pre>  [sret1] /~sret1/backgammon/rules.html</pre> in the Request
  1463. Report. Or
  1464. <pre>
  1465. HOSTALIAS REGEXP:^([^.]*)$ $1.mycompany.com
  1466. </pre>
  1467. would add <kbd>.mycompany.com</kbd> to all hostnames not containing a dot.
  1468. (See the <a href="#designfaq">FAQ</a> for a discussion about whether
  1469. this is a good idea.)
  1470. <p>
  1471. Regular expressions are greedy: if there are two possible ways of matching,
  1472. the part of the expression on the left matches as much as possible.
  1473. <hr>
  1474. <hr>
  1475. <a name="include"><h2>Inclusions and exclusions</h2>
  1476. </a>
  1477. After aliasing each item, analog decides whether that item is wanted or not.
  1478. The whole line is only counted if all the items are wanted.
  1479. Whether an item is wanted or not is determined by <kbd>INCLUDE</kbd> and
  1480. <kbd>EXCLUDE</kbd> commands specified by the user. These commands can be used
  1481. to exclude requests from your local users, for example, or to analyse only
  1482. files in a subdirectory. For example
  1483. <pre>
  1484. HOSTEXCLUDE mycomputer.myisp.com
  1485. </pre>
  1486. would exclude all requests by that computer from the statistics.
  1487. <p>
  1488. The rule for determining whether an item is included or excluded is as
  1489. follows. All the <kbd>INCLUDE</kbd> and <kbd>EXCLUDE</kbd> commands for that
  1490. item are considered one by one in order, and the item is included or excluded
  1491. according to the last command it matched. Items which don't match any of
  1492. the <kbd>INCLUDE</kbd> or <kbd>EXCLUDE</kbd> commands are included if the first
  1493. command was an exclusion, and excluded if the first command was an inclusion.
  1494. For example, the configuration
  1495. <pre>
  1496. FILEINCLUDE /~sret1/*
  1497. FILEEXCLUDE /~sret1/backgammon/*,/~sret1/analog/*
  1498. FILEINCLUDE /~sret1/backgammon/*.gif
  1499. </pre>
  1500. would instruct the program to examine only my files, excluding my
  1501. backgammon and analog files, but including gifs in my backgammon directory.
  1502. On the other hand,
  1503. <pre>
  1504. FILEEXCLUDE /~sret1/*/img/*
  1505. </pre>
  1506. would analyse all files, except for images in my various directories. Note that
  1507. inclusions and exclusions can contain any number of wildcards.
  1508. <p>
  1509. The full list of these commands is <kbd>HOSTINCLUDE</kbd> and
  1510. <kbd>HOSTEXCLUDE</kbd>; <kbd>FILEINCLUDE</kbd> and <kbd>FILEXCLUDE</kbd>;
  1511. <kbd>BROWINCLUDE</kbd> and <kbd>BROWEXCLUDE</kbd>; <kbd>REFINCLUDE</kbd> and
  1512. <kbd>REFEXCLUDE</kbd>; <kbd>USERINCLUDE</kbd> and <kbd>USEREXCLUDE</kbd>; and
  1513. <kbd>VHOSTINCLUDE</kbd> and <kbd>VHOSTEXCLUDE</kbd>.
  1514. <p>
  1515. Because the inclusions and exclusions take place <em>after</em> the aliasing,
  1516. the name you must use is the aliased name. (In the absence of
  1517. <kbd><a href="#OUTPUTALIAS">OUTPUTALIAS</a></kbd> commands, this is
  1518. the name of the item in the output.)
  1519. <p>
  1520. Sometimes a line doesn't contain a particular sort of item, either because
  1521. there is no field reserved for it on the line, or because the browser didn't
  1522. send it for that request. You can include or exclude these lines by making a
  1523. special blank entry in the <kbd>INCLUDE</kbd> or <kbd>EXCLUDE</kbd>
  1524. command. For example,
  1525. <pre>
  1526. USERINCLUDE jim
  1527. USERINCLUDE ""
  1528. </pre>
  1529. would include lines from user <kbd>jim</kbd> and lines without any user
  1530. specified. 
  1531. <p>
  1532. The behaviour of <kbd>REQINCLUDE</kbd> and <kbd>REFINCLUDE</kbd> can be
  1533. slightly unintuitive if the file has <a href="#unintuitive">search
  1534. arguments</a>.
  1535. <p>
  1536. <a name="incregexp">On suitable operating systems</a>, you can use regular
  1537. expressions for the inclusions and exclusions by prefixing the expression with
  1538. "<kbd>REGEXP:</kbd>" or "<kbd>REGEXPI:</kbd>". I've
  1539. already described this at length in the context of aliases, so you can
  1540. <a href="#aliasregexp">look there</a> for all the details.
  1541. <p>
  1542. If you get confused with all the inclusions and
  1543. exclusions, remember that you can always run <kbd>analog -settings</kbd>
  1544. to see what the options you have specified represent.
  1545. <hr>
  1546. <a name="FROMTO">There is also</a> one other pair of commands which belongs in
  1547. this category,
  1548. namely the <kbd>FROM</kbd> and <kbd>TO</kbd> commands. These specify a time
  1549. period to restrict the analysis to. The simplest usage of these commands is
  1550. <kbd>FROM yyMMdd</kbd> or <kbd>FROM yyMMdd:hhmm</kbd>, where <kbd>yy</kbd>
  1551. represents the last two digits of the year (analog assumes that the year is
  1552. between 1970 and 2069), <kbd>MM</kbd> represents the month,
  1553. <kbd>dd</kbd> is the date, <kbd>hh</kbd> the hour, and <kbd>mm</kbd> the
  1554. minute. So, for example, to analyse only requests from
  1555. July 1999 to June 2000 I would use the configuration
  1556. <pre>
  1557. FROM 990701
  1558. TO   000630
  1559. </pre>
  1560. Alternatively, each of the components can be preceded by <kbd>+</kbd> or
  1561. <kbd>-</kbd> to represent time relative to the time at which the program was
  1562. invoked. In this case, the date can have more than 2 digits. This allows
  1563. constructions like
  1564. <pre>
  1565. FROM -01-00+01   # from tomorrow last year
  1566. TO -00-0131  # to the end of last month (OK even if last month
  1567.              # didn't have 31 days)
  1568. FROM -00-00-112
  1569. TO   -00-00-01  # statistics for the last 16 weeks
  1570. FROM -00-00-00:-06+01  # statistics for the last 6 hours
  1571. </pre>
  1572. There are command line abbreviations <kbd>+F</kbd> and <kbd>+T</kbd>
  1573. for the <kbd>FROM</kbd> and <kbd>TO</kbd> commands; for example,
  1574. <kbd>+T-00-00-01:1800</kbd> looks at statistics until 6pm yesterday.
  1575. <kbd>-F</kbd> and <kbd>-T</kbd> turn off the from and to, as do <kbd>FROM
  1576. OFF</kbd> and <kbd>TO OFF</kbd>.
  1577. <hr>
  1578. <a name="outputexcludes">There are also</a> <kbd>INCLUDE</kbd> and
  1579. <kbd>EXCLUDE</kbd> commands for most of
  1580. the reports. These exclude individual lines from particular reports. So, for
  1581. example, the command
  1582. <pre>
  1583. REFREPEXCLUDE http://your.site.com/*
  1584. </pre>
  1585. would exclude your internal referrers from the Referrer Report. However, it
  1586. would not exclude them from the Failed Referrer Report, the Referring Site
  1587. Report, etc. (you need to use <kbd>FAILREFEXCLUDE</kbd>,
  1588. <kbd>REFSITEEXCLUDE</kbd> etc. for that); nor would it prevent other analysis
  1589. of logfile lines with those referrers, as <kbd>REFEXCLUDE</kbd> would. Also
  1590. <kbd>REFREPEXCLUDE</kbd> would include the referrers in the "not
  1591. listed" line at the bottom of the report.
  1592. <p>
  1593. The full list of these commands is <kbd>REQINCLUDE</kbd> and
  1594. <kbd>REQEXCLUDE</kbd>; <kbd>REDIRINCLUDE</kbd> and <kbd>REDIREXCLUDE</kbd>;
  1595. <kbd>FAILINCLUDE</kbd> and <kbd>FAILEXCLUDE</kbd>; <kbd>TYPEINCLUDE</kbd> and
  1596. <kbd>TYPEEXCLUDE</kbd>; <kbd>DIRINCLUDE</kbd> and <kbd>DIREXCLUDE</kbd>;
  1597. <kbd>HOSTREPINCLUDE</kbd> and <kbd>HOSTREPEXCLUDE</kbd>; <kbd>DOMINCLUDE</kbd>
  1598. and <kbd>DOMEXCLUDE</kbd>; <kbd>ORGINCLUDE</kbd> and <kbd>ORGEXCLUDE</kbd>;
  1599. <kbd>REFREPINCLUDE</kbd> and
  1600. <kbd>REFREPEXCLUDE</kbd>; <kbd>REFSITEINCLUDE</kbd> and
  1601. <kbd>REFSITEEXCLUDE</kbd>; <kbd>SEARCHQUERYINCLUDE</kbd> and
  1602. <kbd>SEARCHQUERYEXCLUDE</kbd>; <kbd>SEARCHWORDINCLUDE</kbd> and
  1603. <kbd>SEARCHWORDEXCLUDE</kbd>; <kbd>REDIRREFINCLUDE</kbd> and
  1604. <kbd>REDIRREFEXCLUDE</kbd>; <kbd>FAILREFINCLUDE</kbd> and
  1605. <kbd>FAILREFEXCLUDE</kbd>; <kbd>BROWSUMINCLUDE</kbd> and
  1606. <kbd>BROWSUMEXCLUDE</kbd>; <kbd>FULLBROWINCLUDE</kbd> and
  1607. <kbd>FULLBROWEXCLUDE</kbd>; <kbd>OSINCLUDE</kbd> and <kbd>OSEXCLUDE</kbd>;
  1608. <kbd>VHOSTREPINCLUDE</kbd> and
  1609. <kbd>VHOSTREPEXCLUDE</kbd>; <kbd>USERREPINCLUDE</kbd> and
  1610. <kbd>USERREPEXCLUDE</kbd>; and <kbd>FAILUSERINCLUDE</kbd> and
  1611. <kbd>FAILUSEREXCLUDE</kbd>. The inclusion or exclusion applies to the
  1612. unaliased name, if you are doing any <a href="#OUTPUTALIAS">output
  1613. aliases</a>.
  1614. <p>
  1615. <!-- not just in output IN/EXCLUDEs, although the layout of this text might -->
  1616. <!-- imply that so as to present REQINCLUDE pages in the right place -->
  1617. You can also use the symbolic word <kbd>pages</kbd> in suitable
  1618. <kbd>INCLUDE</kbd> and <kbd>EXCLUDE</kbd> commands; one very common command is
  1619. <pre>
  1620. REQINCLUDE pages
  1621. </pre>
  1622. to include only pages in the request report.
  1623. <hr>
  1624. <a name="PAGEINCLUDE">Analog determines</a> which files should count as pages
  1625. (and thus which requests
  1626. count as page requests) using another <kbd>INCLUDE</kbd>/<kbd>EXCLUDE</kbd>
  1627. pair, called <kbd>PAGEINCLUDE</kbd> and <kbd>PAGEEXCLUDE</kbd>.
  1628. By default, <kbd>*.html</kbd>, <kbd>*.htm</kbd> and directories (<kbd>*/</kbd>)
  1629. count as pages. But you change the list by commands like
  1630. <pre>
  1631. PAGEINCLUDE *.ps,*.ps.gz
  1632. PAGEEXCLUDE /sret1.html
  1633. </pre>
  1634. I.e., Postscript and gzipped Postscript are pages, but <kbd>/sret1.html</kbd>
  1635. isn't. (If the file has <a href="#args">search arguments</a>, the
  1636. <kbd>PAGEINCLUDE</kbd> and <kbd>PAGEEXCLUDE</kbd> are reckoned just on the
  1637. part of the filename before the question mark.)
  1638. <hr>
  1639. <a name="LINKINCLUDE">There is one more</a> set of <kbd>INCLUDE</kbd> and
  1640. <kbd>EXCLUDE</kbd> commands which I'll describe now. In the Request Report
  1641. and the three referrer reports (Referrer Report, Redirected Referrer Report
  1642. and Failed Referrer Report), analog can link to the files which it's
  1643. listing. There are commands <kbd>LINKINCLUDE</kbd> and <kbd>LINKEXCLUDE</kbd>
  1644. for the Request Report, and <kbd>REFLINKINCLUDE</kbd> and
  1645. <kbd>REFLINKEXCLUDE</kbd> for the referrer reports, to specify exactly which
  1646. files are linked to. So, for example,
  1647. <kbd>
  1648. REFLINKINCLUDE pages
  1649. </kbd>
  1650. would link to pages in the three referrer reports.
  1651. <hr>
  1652. There is one final set of <kbd>INCLUDE</kbd> and <kbd>EXCLUDE</kbd> commands
  1653. to include or exclude the search arguments at the end of URLs. But there are
  1654. some slightly complicated issues surrounding those, so they deserve a
  1655. <a href="#args">new section</a>.
  1656. <hr>
  1657. <hr>
  1658. <a name="args"><h2>Search arguments</h2>
  1659. </a>
  1660. Sometimes a URL contains arguments after a question mark. For example, the URL
  1661. <pre>
  1662. /cgi-bin/script.pl?x=1&y=2
  1663. </pre>
  1664. runs the <kbd>/cgi-bin/script.pl</kbd> program with arguments <kbd>x=1</kbd>
  1665. and <kbd>y=2</kbd>. (Sometimes the server records these arguments in a separate
  1666. field in the logfile, but if so you can use the <kbd>%q</kbd> field in the
  1667. <kbd><a href="#fmtstrings">LOGFORMAT</a></kbd> command, and analog
  1668. will translate the filename to the above format).
  1669. <p>
  1670. You can tell analog either to read or to ignore the arguments using the
  1671. commands <kbd>ARGSINCLUDE</kbd> and <kbd>ARGSEXCLUDE</kbd> which we'll discuss
  1672. <a href="#ARGSINCLUDE">in a minute</a>. But by default, all arguments are
  1673. read, and as this is usually what you want, you don't usually need those
  1674. commands.
  1675. <p>
  1676. You don't always see the arguments in the reports, even if they're being
  1677. read, because analog doesn't show them if there aren't enough of them. In
  1678. order to see them, you have to set the corresponding
  1679. <kbd><a href="#ARGSFLOOR">ARGSFLOOR</a></kbd> parameter low
  1680. enough.
  1681. <p>
  1682. Also note that within a report, the search arguments are listed immediately
  1683. under the file to which they refer. This temporarily interrupts the normal
  1684. order of the files. It may be clearer if you turn the
  1685. <a href="#othCOLS"><kbd>N</kbd> column</a> on.
  1686. <hr>
  1687. Assuming that the arguments are being read, analog treats the file
  1688. <kbd>/cgi-bin/script.pl?x=1&y=2</kbd> as a different file from
  1689. <kbd>/cgi-bin/script.pl</kbd> (or from
  1690. <kbd>/cgi-bin/script.pl?y=2&x=1</kbd> for that matter). It doesn't look
  1691. like that in the Request Report because you see a grand total for
  1692. <kbd>/cgi-bin/script.pl</kbd> with all its different arguments. But it matters
  1693. if you want to do <a href="#include">inclusions and exclusions</a> or
  1694. <a href="#useraliases">aliases</a> on the file.
  1695. <p>
  1696. <a name="unintuitive">The reason</a> is that, for example, the command
  1697. <pre>
  1698. FILEINCLUDE /cgi-bin/script.pl
  1699. </pre>
  1700. <em>doesn't</em> match the file <kbd>/cgi-bin/script.pl?x=1&y=2</kbd>. To
  1701. match that, you would have to use something like
  1702. <pre>
  1703. FILEINCLUDE /cgi-bin/script.pl*
  1704. </pre>
  1705. instead. Similarly
  1706. <pre>
  1707. FILEALIAS /cgi-bin/script.pl /script.pl
  1708. </pre>
  1709. will change <kbd>/cgi-bin/script.pl</kbd> itself, but not
  1710. <kbd>/cgi-bin/script.pl?x=1&y=2</kbd>. You might want to use something
  1711. like
  1712. <pre>
  1713. FILEALIAS /cgi-bin/script.pl?* /script.pl?$1
  1714. </pre>
  1715. as well. (However, <kbd>PAGEINCLUDE</kbd> and <kbd>PAGEEXCLUDE</kbd> always
  1716. refer to the part of the filename before the question mark.)
  1717. <hr>
  1718. <a name="ARGSINCLUDE">The alternative</a> is to tell analog not to read the
  1719. search arguments. There are commands called <kbd>ARGSINCLUDE</kbd> and
  1720. <kbd>ARGSEXCLUDE</kbd>, and <kbd>REFARGSINCLUDE</kbd> and
  1721. <kbd>REFARGSEXCLUDE</kbd>, to do this. They work the same as the
  1722. <a href="#include">other <kbd>INCLUDE</kbd> and <kbd>EXCLUDE</kbd></a>
  1723. commands which we discussed in the previous section. So, for example, if the
  1724. command
  1725. <pre>
  1726. ARGSEXCLUDE /cgi-bin/script.pl
  1727. </pre>
  1728. were given, analog would ignore the arguments to that file, and so read
  1729. <kbd>/cgi-bin/script.pl?x=1&y=2</kbd> as just
  1730. <kbd>/cgi-bin/script.pl</kbd>. On the other hand, if
  1731. <pre>
  1732. ARGSINCLUDE /cgi-bin/script.pl
  1733. </pre>
  1734. were specified, analog would read the arguments, and so treat
  1735. <kbd>/cgi-bin/script.pl?x=1&y=2</kbd> as a different file from
  1736. <kbd>/cgi-bin/script.pl</kbd>.
  1737. <kbd>REFARGSINCLUDE</kbd> and <kbd>REFARGSEXCLUDE</kbd> are the same
  1738. for referrers.
  1739. <p>
  1740. Technical note: the check for whether the arguments should be included happens
  1741. before the filename has been subject to either built-in or user-specified
  1742. <a href="#alias">aliases</a>. So you have to use the unaliased name,
  1743. exactly as it occurs in the logfile. For example,
  1744. <kbd>ARGSINCLUDE /~sret1/script.pl</kbd> won't match
  1745. <kbd>/%7Esret1/script.pl</kbd> even though they are really the same
  1746. file. It also means that you can't use "<kbd>pages</kbd>" in the
  1747. <kbd>ARGSINCLUDE</kbd> or <kbd>ARGSEXCLUDE</kbd> command, because we don't
  1748. know whether a file is a page until after it's been aliased.
  1749. <hr>
  1750. <a name="SEARCHENGINE">There is a related command</a> called
  1751. <kbd>SEARCHENGINE</kbd>. If you have referrers with search arguments, usually
  1752. from search engines, you can tell analog which field corresponds to the search
  1753. term. It uses this information to compile the Search Query Report and the
  1754. Search Word Report. For example, consider the referrer
  1755. <pre>
  1756. http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&q=carrot+cake
  1757. </pre>
  1758. The search term is in the field <kbd>q=</kbd> so the appropriate
  1759. <kbd>SEARCHENGINE</kbd> command is
  1760. <pre>
  1761. SEARCHENGINE http://www.altavista.com/cgi-bin/query q
  1762. </pre>
  1763. or even better
  1764. <pre>
  1765. SEARCHENGINE http://*altavista.*/* q
  1766. </pre>
  1767. to allow for all their mirror sites in different countries.
  1768. <p>
  1769. Sometimes a search engine has two or more possible fields for the search
  1770. term. In that case you can list all of them separated by commas, like this:
  1771. <pre>
  1772. SEARCHENGINE http://*webcrawler.*/* search,searchText
  1773. </pre>
  1774. <hr>
  1775. The rest of this section is a bit technical, and you usually don't need to
  1776. worry about it. On a first reading, you might like to
  1777. <a href="#output">skip it</a>.
  1778. <p>
  1779. <a name="SCC">I said</a> <a href="#DIRSUFFIX">previously</a> that
  1780. <kbd>%7E</kbd> in a URL is automatically converted to <kbd>~</kbd>, etc. In
  1781. fact this is only done to the ASCII-printable characters <kbd>%20-%7E</kbd>
  1782. (because these are the only characters that are the same in every character
  1783. set).
  1784. <p>
  1785. But in the Search Query Report and Search Word Report it is useful to be able
  1786. to convert non-ASCII characters too, so that you can see the actual words
  1787. people typed, rather than get the <kbd>%nm</kbd> codes in place of all
  1788. accented letters. So in these reports analog also converts characters
  1789. <kbd>%A0-%FF</kbd> (if you are using an ISO-8859-* character set) or
  1790. <kbd>%80-%FF</kbd> (for other character sets, apart from ASCII).
  1791. <p>
  1792. However, there are reasons why you might not want this feature, and you can
  1793. turn it off with the command
  1794. <pre>
  1795. SEARCHCHARCONVERT OFF
  1796. </pre>
  1797. These reasons include:
  1798. <ol>
  1799.   <li>The character set in which the query was submitted to the search engine
  1800.       may not be the same as that in which the page reached was written, or
  1801.       that in which the analog output page is being written. So converting to
  1802.       the character set of the analog output page may give garbage anyway.
  1803.       This is particularly a problem with languages, such as Russian or
  1804.       Chinese, which have two or more characters sets in common use. It is
  1805.       also a problem for sites which host resources in many languages.
  1806.   <li>Not all of the character positions correspond to printable characters in
  1807.       every character set. Analog knows that <kbd>%80-%9F</kbd> are
  1808.       non-printable in the ISO-8859-* character sets, but apart from that it
  1809.       converts everything in <kbd>%80-%FF</kbd>. So you may end up with
  1810.       non-printable characters in your output.
  1811.   <li>I have no idea how well, if at all, this feature will work with multibyte
  1812.       character sets (such as most East Asian languages). You will probably
  1813.       find you want to turn it off in this case.
  1814. </ol>
  1815. <hr>
  1816. <hr>
  1817. <a name="output"><h2>Configuring the output</h2>
  1818. </a>
  1819. So far we have mainly discussed commands which control how analog reads
  1820. the logfiles. We now get on to commands for configuring the output.
  1821.  
  1822. <p>
  1823. <a name="replist">There are 32 different reports</a> which analog can produce,
  1824. if your logfiles
  1825. contain the necessary information. Each one has a short name, and a code
  1826. letter or number, as follows:
  1827. <pre>
  1828. x  <kbd>GENERAL</kbd>      General Summary
  1829. m  <kbd>MONTHLY</kbd>      Monthly Report
  1830. W  <kbd>WEEKLY</kbd>       Weekly Report
  1831. D  <kbd>FULLDAILY</kbd>    Daily Report
  1832. d  <kbd>DAILY</kbd>        Daily Summary
  1833. H  <kbd>FULLHOURLY</kbd>   Hourly Report
  1834. h  <kbd>HOURLY</kbd>       Hourly Summary
  1835. 4  <kbd>QUARTER</kbd>      Quarter-Hour Report
  1836. 5  <kbd>FIVE</kbd>         Five-Minute Report
  1837. S  <kbd>HOST</kbd>         Host Report
  1838. Z  <kbd>ORGANISATION</kbd> Organisation Report
  1839. o  <kbd>DOMAIN</kbd>       Domain Report
  1840. r  <kbd>REQUEST</kbd>      Request Report
  1841. i  <kbd>DIRECTORY</kbd>    Directory Report
  1842. t  <kbd>FILETYPE</kbd>     File Type Report
  1843. z  <kbd>SIZE</kbd>         File Size Report
  1844. P  <kbd>PROCTIME</kbd>     Processing Time Report
  1845. E  <kbd>REDIR</kbd>        Redirection Report
  1846. I  <kbd>FAILURE</kbd>      Failure Report
  1847. f  <kbd>REFERRER</kbd>     Referrer Report
  1848. s  <kbd>REFSITE</kbd>      Referring Site Report
  1849. N  <kbd>SEARCHQUERY</kbd>  Search Query Report
  1850. n  <kbd>SEARCHWORD</kbd>   Search Word Report
  1851. k  <kbd>REDIRREF</kbd>     Redirected Referrer Report
  1852. K  <kbd>FAILREF</kbd>      Failed Referrer Report
  1853. B  <kbd>FULLBROWSER</kbd>  Browser Report
  1854. b  <kbd>BROWSER</kbd>      Browser Summary
  1855. p  <kbd>OSREP</kbd>        Operating System Report
  1856. v  <kbd>VHOST</kbd>        Virtual Host Report
  1857. u  <kbd>USER</kbd>         User Report
  1858. J  <kbd>FAILUSER</kbd>     Failed User Report
  1859. c  <kbd>STATUS</kbd>       Status Code Report
  1860. </pre>
  1861. For details on what the various reports mean, and a summary of the commands
  1862. which control them, see the section on
  1863. <cite><a href="#reports">Analog's reports</a></cite>.
  1864.  
  1865. <hr>
  1866. <a name="ONOFF">You can turn each report on or off</a> with configuration
  1867. commands like
  1868. <pre>
  1869. FIVE OFF
  1870. REFSITE ON
  1871. </pre>
  1872. or by using command line arguments like <kbd>-5</kbd> and <kbd>+s</kbd>.
  1873. You can also turn all reports except the General Summary on or off with the
  1874. commands <kbd>ALL ON</kbd> and <kbd>ALL OFF</kbd>, or with the command line
  1875. arguments <kbd>+A</kbd> and <kbd>-A</kbd>.
  1876. <p>
  1877. <a name="GOTOS">You can turn the "Go To" lines</a> in the report off
  1878. with the command
  1879. <pre>
  1880. GOTOS OFF
  1881. </pre>
  1882. <kbd>GOTOS ON</kbd> turns them on again, and <kbd>GOTOS FEW</kbd> puts the
  1883. "Go To" lines just at the top and bottom. <kbd>GOTOS OFF</kbd> can
  1884. be abbreviated with the <kbd>-X</kbd> command line argument, and
  1885. <kbd>GOTOS ON</kbd> with <kbd>+X</kbd>.
  1886. <p>
  1887. <a name="RUNTIME">You can turn</a> the "Running Time" line at the
  1888. bottom of the report off with the command
  1889. <pre>
  1890. RUNTIME OFF
  1891. </pre>
  1892. and on again with <kbd>RUNTIME ON</kbd>.
  1893. <p>
  1894. <a name="LASTSEVEN">The figures in parentheses</a> in the General Summary are
  1895. for the last seven days:
  1896. either the seven days before the <kbd>TO</kbd> time, or if no <kbd>TO</kbd>
  1897. time is given, the seven days before the time of the program start. The
  1898. figures for the last seven days are normally included if some, but not all,
  1899. of the requests fall in those seven days; but you can turn them off by means
  1900. of the command
  1901. <pre>
  1902. LASTSEVEN OFF
  1903. </pre>
  1904. Of course <kbd>LASTSEVEN ON</kbd> turns them on again.
  1905. <p>
  1906. <a name="REPORTORDER">You can change the order</a> of the reports by means of
  1907. the <kbd>REPORTORDER</kbd>
  1908. command. You should list the code letters for all possible reports in the order
  1909. you want them, like this:
  1910. <pre>
  1911. REPORTORDER xcmdDhH45WriSoEItzsfKkuJvbB
  1912. </pre>
  1913.  
  1914. <hr>
  1915. <a name="OUTFILE">You can change which file</a> the output goes to with a
  1916. command like
  1917. <pre>
  1918. OUTFILE stats.htm
  1919. </pre>
  1920. or with a command line argument like <kbd>+Ostats.htm</kbd>. If you use the
  1921. filename <kbd>-</kbd> or <kbd>stdout</kbd>, the output will go to standard
  1922. output, which is normally the screen, but Unix users might like to redirect it
  1923. to another file or even into a pipe. You can also use an absolute path name,
  1924. like
  1925. <pre>
  1926. OUTFILE /usr/bin/httpd/htdocs/stats.html  # Unix
  1927. OUTFILE "Hard Disk:Server Apps:WebSTAR:Analog:Report.html" # Mac
  1928. </pre>
  1929.  
  1930. <p>
  1931. Sometimes it's convenient to include the date in the name of the
  1932. <kbd>OUTFILE</kbd>. You can do this by including the following codes in the
  1933. filename.
  1934. <pre>
  1935. %D  date of month
  1936. %m  month name
  1937. %M  month number
  1938. %y  two-digit year
  1939. %Y  four-digit year
  1940. %H  hour
  1941. %n  minute
  1942. %w  day of week
  1943. </pre>
  1944. So for example,
  1945. <pre>
  1946. OUTFILE stats%y%M.html
  1947. </pre>
  1948. will produce filenames like <kbd>stats9905.html</kbd>. The date used is the
  1949. <kbd><a href="#FROMTO">TO</a></kbd> date if one was specified, and
  1950. otherwise the time of the start of the program.
  1951.  
  1952. <hr>
  1953. <a name="outstyle">Now we come</a> to some very important commands. The first
  1954. is the <kbd>OUTPUT</kbd>
  1955. command, which changes the style of the output. There are three possible output
  1956. styles, <kbd>HTML</kbd>, <kbd>ASCII</kbd> and <kbd>COMPUTER</kbd>. The first
  1957. produces Web pages, the second plain text files (which you could mail to
  1958. people, for example) and the third produces output suitable for reading by a
  1959. computer (useful for reading into a spreadsheet, or post-processing with a
  1960. graphics package, for example). 
  1961. There is a separate section about the <cite><a href="#compout">Computer
  1962. readable output</a></cite> later. As well as a command like
  1963. <pre>
  1964. OUTPUT ASCII
  1965. </pre>
  1966. you can also select <kbd>ASCII</kbd> style with the command line argument
  1967. <kbd>+a</kbd>, and <kbd>HTML</kbd> with the command line argument
  1968. <kbd>-a</kbd>. You can also specify <kbd>OUTPUT NONE</kbd>
  1969. for no output, if you are producing a <a href="#cache">cache file</a>.
  1970. <hr>
  1971. <a name="LANGUAGE">Next, you can change the language</a> of the output. There
  1972. are two ways to do
  1973. this. The usual way is to use the <kbd>LANGUAGE</kbd> command. For example,
  1974. the command
  1975. <pre>
  1976. LANGUAGE FRENCH
  1977. </pre>
  1978. will give you the output in French. The available languages at the moment are
  1979. <kbd>ARMENIAN</kbd>, <kbd>BOSNIAN</kbd>, <kbd>CATALAN</kbd>,
  1980. <kbd>SIMP-CHINESE</kbd> (GB2312 encoding),
  1981. <kbd>TRAD-CHINESE</kbd> (Big5 encoding),
  1982. <kbd>CZECH</kbd>, <kbd>DANISH</kbd>, <kbd>DUTCH</kbd>,
  1983. <kbd>ENGLISH</kbd>, <kbd>US-ENGLISH</kbd>, <kbd>FINNISH</kbd>,
  1984. <kbd>FRENCH</kbd>, <kbd>GERMAN</kbd>, <kbd>GREEK</kbd>, <kbd>ITALIAN</kbd>,
  1985. <kbd>JAPANESE</kbd>, <kbd>NORWEGIAN</kbd> (Bokmål),
  1986. <kbd>NYNORSK</kbd>, <kbd>POLISH</kbd>, <kbd>PORTUGUESE</kbd>,
  1987. <kbd>BR-PORTUGUESE</kbd>,
  1988. <kbd>RUSSIAN</kbd>, <kbd>SERBIAN</kbd>, <kbd>SLOVAK</kbd>, <kbd>SLOVENE</kbd>,
  1989. <kbd>SPANISH</kbd>, <kbd>SWEDISH</kbd>, <kbd>TURKISH</kbd> and
  1990. <kbd>UKRAINIAN</kbd>.
  1991.  
  1992. <p><i>Note: The following additional languages were available in version 3
  1993. of analog:
  1994. <kbd>HUNGARIAN</kbd>, <kbd>ICELANDIC</kbd>,
  1995. <kbd>KOREAN</kbd>, <kbd>LATVIAN</kbd>,
  1996. <kbd>LITHUANIAN</kbd> and <kbd>ROMANIAN</kbd>.
  1997. I hope that they will be available for this version soon. As they are
  1998. translated, they will be added to the
  1999. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>.
  2000. Version 3 of analog will also be available at the
  2001. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>
  2002. for a while, if you need one of these languages. Alternatively, you can find
  2003. the language files in the <kbd>lang</kbd> directory, and translate the few
  2004. new English phrases yourself.</i>
  2005. <p>
  2006. The other way is to use the <kbd>LANGFILE</kbd> command. This is useful if you
  2007. want to download a new language from the
  2008. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>, or
  2009. if you want to translate one yourself, or even if you want to change some
  2010. words or phrases or the way the dates and times are formatted in the output.
  2011. The <kbd>LANGFILE</kbd> command tells analog in which file to find the various
  2012. words and phrases for a new language. For example, the command
  2013. <pre>
  2014. LANGFILE lang/guarani.lng   # or
  2015. LANGFILE /usr/etc/httpd/analog/lang/guarani.lng
  2016. </pre>
  2017. would read from that file. (Note that you have to include the directory name if
  2018. the file isn't in the directory or folder which you're running analog from. In
  2019. particular, it's not assumed to be in the same directory as the other language
  2020. files.)
  2021. <p>
  2022. Some languages also have <a href="#domfile">domains files</a>
  2023. available. These are normally selected  automatically by the
  2024. <kbd>LANGUAGE</kbd> command. But you can tell analog to use a different
  2025. domains file with the <kbd><a href="#domfile">DOMAINSFILE</a></kbd>
  2026. command. Also, some languages have translations of the
  2027. <a href="#form">form interface</a>. 
  2028. <p>
  2029. If you want to translate another language, I would be delighted! You'd be wise
  2030. to contact me first to make sure that no-one else is already translating the
  2031. same language. The English language file contains some brief instructions for
  2032. translating new languages.
  2033. <hr>
  2034. <a name="TIMEOFFSET">Sometimes</a> your server is not in the same timezone as
  2035. you, or at least records the times in its logfiles in a different timezone
  2036. (for example GMT). So that you can get your
  2037. statistics in your local time, there is a command called
  2038. <kbd>LOGTIMEOFFSET</kbd> to change the time by a certain number of minutes. As
  2039. with the <kbd><a href="#logfmt">LOGFORMAT</a></kbd> command, this only
  2040. affects logfiles which come <em>later</em> in the <em>same</em> configuration
  2041. file.
  2042. <p>
  2043. You have to be careful using this command. Because of
  2044. daylight savings time in operation in different parts of the world at
  2045. different times, analog cannot attempt to convert between different
  2046. timezones. So it's your responsibility to set the right offset for different
  2047. times of year. For example, if you were in Chicago, but your server was
  2048. recording time in GMT, you would need to specify two different time offsets,
  2049. one of minus five hours for summer and one of minus six hours for winter. You
  2050. would need to split your logfiles in the right places and then run commands
  2051. like
  2052. <pre>
  2053. LOGTIMEOFFSET -300
  2054. LOGFILE summer*.log
  2055. LOGTIMEOFFSET -360
  2056. LOGFILE winter*.log
  2057. </pre>
  2058. <p>
  2059. There is also a related command called <kbd>TIMEOFFSET</kbd>. This tells
  2060. analog how much to offset the time of the computer on which it is running
  2061. (rather than the computer running the server), to get your local time. 
  2062. <hr>
  2063. <a name="NOROBOTS">There is a command</a> called <kbd>NOROBOTS</kbd> which
  2064. stops robots which obey the
  2065. <a href="http://info.webcrawler.com/mak/projects/robots/exclusion.html#meta">robots META tag</a>
  2066. from indexing your output page or following its links. Normally this is set to
  2067. <kbd>ON</kbd> but you can specify <kbd>NOROBOTS OFF</kbd> if you don't mind
  2068. robots finding your other pages this way. Note that you will stop far more
  2069. robots if you put your stats page in your
  2070. <kbd><a href="http://info.webcrawler.com/mak/projects/robots/exclusion.html#robotstxt">robots.txt</a></kbd>
  2071. file; on the other hand, this file has to be kept up to date by the server
  2072. administrator.
  2073. <hr>
  2074. <a name="IMAGEDIR">There are a few</a> more minor, although cosmetically
  2075. important, commands
  2076. affecting the output. First there's a command <kbd>IMAGEDIR</kbd> which tells
  2077. analog where the various images used to make the report live. It could be a
  2078. relative or an absolute URL: for example
  2079. <pre>
  2080. IMAGEDIR img/   # within the same directory as the output
  2081. IMAGEDIR /img/  # off the root directory of your server
  2082. </pre>
  2083. <p>
  2084. <a name="LOGO">There are three commands</a> which affect the top line of the
  2085. output. First,
  2086. the <kbd>LOGO</kbd> command allows you to replace the analog logo with
  2087. another image (for example, your organisation's logo). You can say
  2088. <pre>
  2089. LOGO picture.gif  # for this file
  2090. LOGO /images/picture2.gif  # a different file
  2091. LOGO none         # for no logo
  2092. </pre>
  2093. The logo is assumed to be inside the <kbd>IMAGEDIR</kbd> unless it starts
  2094. with a slash, or contains <kbd>://</kbd>
  2095. <p>
  2096. <a name="HOSTNAME">Then</a> there are commands <kbd>HOSTNAME</kbd> and
  2097. <kbd>HOSTURL</kbd> which
  2098. affect the name and link at the end of the title line. For example, I might
  2099. specify
  2100. <pre>
  2101. HOSTNAME "Stephen Turner"
  2102. HOSTURL  http://www.statslab.cam.ac.uk/~sret1/
  2103. </pre>
  2104. to generate the title "Web Server Statistics for
  2105. <a href="http://www.statslab.cam.ac.uk/~sret1/">Stephen Turner</a>".
  2106. Again, you can use <kbd>none</kbd> as the <kbd>HOSTURL</kbd> to specify no
  2107. link. Analog will normally translate characters in the hostname to HTML if
  2108. necessary. So to include literal HTML, such as accented characters, in the
  2109. output you need to precede them by a backslash, like this: 
  2110. <pre>
  2111. HOSTNAME "M\&uuml;ller & S\&ouml;hne"
  2112. </pre>
  2113. <hr>
  2114. <a name="HEADERFILE">There are commands</a> called <kbd>HEADERFILE</kbd> and
  2115. <kbd>FOOTERFILE</kbd>.
  2116. These let you specify files to be inserted near the top and bottom of your
  2117. output. You can specify
  2118. <pre>
  2119. HEADERFILE none
  2120. </pre>
  2121. to cancel a previously-specified header file.
  2122. <hr>
  2123. <a name="STYLESHEET">There is a command</a> called <kbd>STYLESHEET</kbd> to
  2124. specify a style sheet for the output. This allows you to specify colours etc.
  2125. (See <a href="http://www.w3.org/Style/css/">http://www.w3.org/Style/css/</a>
  2126. for how to write a style sheet.) For example,
  2127. <pre>
  2128. STYLESHEET /housestyle.css
  2129. STYLESHEET none   # to cancel it
  2130. </pre>
  2131. <i>Hint: a common mistake in writing style sheets is to declare a font-family
  2132. for the body, but then not put <pre> sections back into a monospaced
  2133. font. This stops the columns lining up properly. Your style sheet should
  2134. contain a line like the following:</i>
  2135. <pre>
  2136. PRE, TT, CODE, KBD, SAMP { font-family: monospace }
  2137. </pre>
  2138. <hr>
  2139. <a name="SEPCHAR">There are three</a> related commands called
  2140. <kbd>SEPCHAR</kbd>,
  2141. <kbd>REPSEPCHAR</kbd> and <kbd>DECPOINT</kbd>. These specify single characters
  2142. to be used as the thousands separator in numbers, the thousands separator
  2143. within the columns in the reports, and the decimal point. For example, a
  2144. French user might choose
  2145. <pre>
  2146. SEPCHAR " "
  2147. REPSEPCHAR none
  2148. DECPOINT ,
  2149. </pre>
  2150. to make "three thousand and a quarter" look like
  2151. "3 000,25" in text and "3000,25" in the reports.
  2152. <hr>
  2153. <a name="RAWBYTES">There is a command</a> called <kbd>RAWBYTES</kbd>. Specify
  2154. <kbd>RAWBYTES ON</kbd>
  2155. if you want the exact number of bytes to be listed in reports, or
  2156. <kbd>RAWBYTES OFF</kbd> if you want the number of kilobytes or Megabytes
  2157. as appropriate to be listed instead.
  2158. <hr>
  2159. <a name="PAGEWIDTH">Finally</a> there are commands called
  2160. <kbd>HTMLPAGEWIDTH</kbd> and <kbd>ASCIIPAGEWIDTH</kbd> which specify the
  2161. width of the page. Obviously, the former is used when the output style is
  2162. HTML, and the latter when the output style is ASCII.
  2163. The output is not guaranteed to fit in this width, but
  2164. analog will take notice of it when choosing the width of the time graphs,
  2165. when sorting the host report alphabetically, when drawing horizontal rules,
  2166. and when writing some bits of text.
  2167. <hr>
  2168. There are now some sections about configuring the output of particular
  2169. reports, under the following headings: <cite><a href="#timereps">Time
  2170. reports</a></cite>, <cite><a href="#othreps">Other reports</a></cite>
  2171. and <cite><a href="#hierreps">Hierarchical reports</a></cite>.
  2172. <hr>
  2173. <hr>
  2174. <a name="timereps"><h2>Time reports</h2>
  2175. </a>
  2176. This section is about commands which control the appearance of the time
  2177. reports. There are eight such reports, which show the pattern of usage
  2178. over time. Six of them show the usage at specific times, whilst the Hourly
  2179. Summary and the Daily Summary show the total (not average) activity at
  2180. particular times of day and week over the whole time period of the report.
  2181. <p>
  2182. <a name="timeCOLS">Each time report</a> can contain columns listing the
  2183. requests, requests for
  2184. pages, and bytes transferred at that time, using the following code letters.
  2185. <dl compact>
  2186.   <dt><kbd>R</kbd><dd>Number of requests
  2187.   <dt><kbd>r</kbd><dd>Percentage of the requests
  2188.   <dt><kbd>P</kbd><dd>Number of page requests
  2189.   <dt><kbd>p</kbd><dd>Percentage of the page requests
  2190.   <dt><kbd>B</kbd><dd>Number of bytes transferred
  2191.   <dt><kbd>b</kbd><dd>Percentage of the bytes
  2192. </dl>
  2193. Which columns appear in which reports is controlled by various <kbd>COLS</kbd>
  2194. commands. For example, the command
  2195. <pre>
  2196. HOURCOLS Pb
  2197. </pre>
  2198. tells analog to include the number of page requests and percentage of the
  2199. bytes, in that order, as the columns for the Hourly Summary. The other
  2200. <kbd>COLS</kbd> commands are <kbd>MONTHCOLS</kbd>, <kbd>WEEKCOLS</kbd>,
  2201. <kbd>DAYCOLS</kbd> (Daily Summary), <kbd>FULLDAYCOLS</kbd> (Daily Report),
  2202. <kbd>FULLHOURCOLS</kbd> (Hourly Report), <kbd>QUARTERCOLS</kbd> and
  2203. <kbd>FIVECOLS</kbd>. There is also a <kbd>TIMECOLS</kbd> command, which
  2204. specifies that all the time reports are to have the specified columns.
  2205. <hr>
  2206. <a name="GRAPH">Similarly</a>, analog can plot the bar charts in the time
  2207. reports according to
  2208. the number of requests, number of page requests, or number of bytes. This
  2209. is controlled by the <kbd>GRAPH</kbd> family of commands. So, for example,
  2210. <pre>
  2211. FULLDAYGRAPH P
  2212. </pre>
  2213. tells analog to plot the bar charts in the Daily Report by the number of page
  2214. requests. This also controls how analog decides which is the busiest time
  2215. period in the bottom line of the report.
  2216. Using a lower case letter tells analog to plot the bar charts with
  2217. ASCII characters instead of the normal red bars. (This produces shorter
  2218. output, and it is how they appear anyway in <kbd>ASCII</kbd> output style,
  2219. or when viewed with a non-graphical browser.) So, for example,
  2220. <pre>
  2221. FULLDAYGRAPH b
  2222. </pre>
  2223. would plot the Daily Report by bytes, without using the graphics. The other
  2224. <kbd>GRAPH</kbd> commands are <kbd>MONTHGRAPH</kbd>, <kbd>WEEKGRAPH</kbd>,
  2225. <kbd>DAYGRAPH</kbd>, <kbd>HOURGRAPH</kbd>, <kbd>FULLHOURGRAPH</kbd>,
  2226. <kbd>QUARTERGRAPH</kbd> and <kbd>FIVEGRAPH</kbd>. There's also an
  2227. <kbd>ALLGRAPH</kbd> command to set all of them simultaneously.
  2228. <hr>
  2229. <a name="BARSTYLE">There are various</a> possible graphics available for the
  2230. graphs, controlled by
  2231. the <kbd>BARSTYLE</kbd> command, as follows. (They will all look the same if
  2232. you have a non-graphical browser.)
  2233. <pre><tt>
  2234. BARSTYLE a  <img src="bara8.gif" alt="+++++++++++">
  2235. BARSTYLE b  <img src="barb8.gif" alt="+++++++++++">
  2236. BARSTYLE c  <img src="barc8.gif" alt="+++++++++++">
  2237. BARSTYLE d  <img src="bard8.gif" alt="+++++++++++">
  2238. BARSTYLE e  <img src="bare8.gif" alt="+++++++++++">
  2239. BARSTYLE f  <img src="barf8.gif" alt="+++++++++++">
  2240. BARSTYLE g  <img src="barg8.gif" alt="+++++++++++">
  2241. BARSTYLE h  <img src="barh8.gif" alt="+++++++++++">
  2242. </tt></pre>
  2243. The default style is <kbd>b</kbd>.
  2244. <hr>
  2245. <a name="BACK">You can plot the graphs</a> either forwards in time (starting
  2246. from the earliest
  2247. date) or backwards (starting from the latest date). Use commands
  2248. like
  2249. <pre>
  2250. MONTHBACK ON  # Monthly Report backwards
  2251. WEEKBACK OFF  # Weekly Report forwards
  2252. </pre>
  2253. The other <kbd>BACK</kbd> commands are <kbd>FULLDAYBACK</kbd>,
  2254. <kbd>FULLHOURBACK</kbd>, <kbd>QUARTERBACK</kbd> and <kbd>FIVEBACK</kbd>.
  2255. It tends to be confusing to mix directions (and analog will warn you if you
  2256. attempt it) so usually you want to use the <kbd>ALLBACK</kbd> command which
  2257. will set all of them at once.
  2258. <hr>
  2259. <a name="ROWS">For the more detailed time reports</a>, you usually only want
  2260. to list the last
  2261. few time periods. (Every five minutes for the last three years?? I think not.)
  2262. So analog provides some <kbd>ROWS</kbd> commands to let you specify how many
  2263. rows you want in the time reports. For example
  2264. <pre>
  2265. QUARTERROWS 96  # only the last day's worth
  2266. MONTHROWS 0 # 0 means no restriction: show all time
  2267. </pre>
  2268. The other <kbd>ROWS</kbd> commands are <kbd>WEEKROWS</kbd>,
  2269. <kbd>FULLDAYROWS</kbd>, <kbd>FULLHOURROWS</kbd> and <kbd>FIVEROWS</kbd>.
  2270. Even if a <kbd>ROWS</kbd> command is given, the line at the bottom of the
  2271. report will still show the busiest time period ever, not just the busiest
  2272. one in that many rows.
  2273. <hr>
  2274. <a name="MARKCHAR">The character</a> which is used for plotting the graphs in
  2275. ASCII style or on a
  2276. non-graphical browser is specified by means of the <kbd>MARKCHAR</kbd>
  2277. command. For example,
  2278. <pre>
  2279. MARKCHAR =
  2280. </pre>
  2281. tells analog to use the equals sign.
  2282. <p>
  2283. <a name="MINGRAPHWIDTH">There is a parameter</a> called
  2284. <kbd>MINGRAPHWIDTH</kbd> which sets the minimum
  2285. nominal size of the graphs. For example, if you set
  2286. <pre>
  2287. MINGRAPHWIDTH 10
  2288. </pre>
  2289. then the graph will be allowed to be up to 10 characters wide, even if
  2290. that would exceed the <kbd>PAGEWIDTH</kbd>.
  2291. <p>
  2292. <a name="WEEKBEGINSON">There is one more command</a> which affects the time
  2293. reports. You can specify
  2294. which day should be counted as the first day of the week. This affects the
  2295. layout of the Daily Report, Daily Summary and Weekly Report. For example,
  2296. our local student newspaper publishes a new edition on the web every Friday,
  2297. so they like to specify
  2298. <kbd>
  2299. WEEKBEGINSON FRIDAY
  2300. </kbd>
  2301. for their reports.
  2302. <p>
  2303. In the next section, we'll look at commands relating to the
  2304. <a href="#othreps">non-time reports</a>.
  2305. <hr>
  2306. <hr>
  2307. <a name="othreps"><h2>Other reports</h2>
  2308. </a>
  2309. This section deals with the non-time reports. There are quite a lot of
  2310. commands which control these reports, although we've seen some of them
  2311. already.
  2312.  
  2313. <p>
  2314. <a name="othCOLS">First</a>, these reports have <kbd>COLS</kbd> commands, just like the time
  2315. reports. (See the section on <cite><a href="#timeCOLS">Time
  2316. reports</a></cite> for how to use these commands.) In the non-time reports,
  2317. two additional columns are available, namely <kbd>D</kbd> for date of last
  2318. access, and <kbd>N</kbd> for the number of the item in the list. So, for
  2319. example,
  2320. <pre>
  2321. REQCOLS NRD
  2322. </pre>
  2323. counts the files in the Request Report, listing the number of requests for
  2324. each and the time when each was last requested. The full list of
  2325. <kbd>COLS</kbd>
  2326. commands for non-time reports is <kbd>HOSTCOLS</kbd>, <kbd>ORGCOLS</kbd>,
  2327. <kbd>DOMCOLS</kbd>,
  2328. <kbd>REQCOLS</kbd>, <kbd>DIRCOLS</kbd>, <kbd>TYPECOLS</kbd>,
  2329. <kbd>SIZECOLS</kbd>, <kbd>PROCTIMECOLS</kbd>, <kbd>REDIRCOLS</kbd>,
  2330. <kbd>FAILCOLS</kbd>,
  2331. <kbd>REFCOLS</kbd>, <kbd>REFSITECOLS</kbd>, <kbd>SEARCHQUERYCOLS</kbd>,
  2332. <kbd>SEARCHWORDCOLS</kbd>, <kbd>REDIRREFCOLS</kbd>,
  2333. <kbd>FAILREFCOLS</kbd>, <kbd>FULLBROWCOLS</kbd> (Browser Report),
  2334. <kbd>BROWCOLS</kbd> (Browser Summary), <kbd>OSCOLS</kbd>, <kbd>VHOSTCOLS</kbd>,
  2335. <kbd>USERCOLS</kbd>, <kbd>FAILUSERCOLS</kbd> and <kbd>STATUSCOLS</kbd>. Not
  2336. every column is allowed in every report, but if you specify an illegal one,
  2337. analog will warn you about it.
  2338. <hr>
  2339. <a name="SORTBY">Next</a> you need to know how use a <kbd>SORTBY</kbd> command
  2340. to specify
  2341. how the reports should be sorted. There are six possible ways of sorting
  2342. reports: <kbd>REQUESTS</kbd>, <kbd>PAGES</kbd> (i.e., page requests),
  2343. <kbd>BYTES</kbd>, <kbd>DATE</kbd>, <kbd>ALPHABETICAL</kbd> and
  2344. <kbd>RANDOM</kbd> (no sorting, sometimes useful for speed in very long
  2345. reports). For example, the command
  2346. <pre>
  2347. HOSTSORTBY ALPHABETICAL
  2348. </pre>
  2349. will sort the Host Report alphabetically. The other <kbd>SORTBY</kbd> commands
  2350. are <kbd>ORGSORTBY</kbd>, <kbd>DOMSORTBY</kbd>, <kbd>REQSORTBY</kbd>,
  2351. <kbd>DIRSORTBY</kbd>,
  2352. <kbd>TYPESORTBY</kbd>, <kbd>REDIRSORTBY</kbd>, <kbd>FAILSORTBY</kbd>,
  2353. <kbd>REFSORTBY</kbd>, <kbd>REFSITESORTBY</kbd>, <kbd>SEARCHQUERYSORTBY</kbd>,
  2354. <kbd>SEARCHWORDSORTBY</kbd>, <kbd>REDIRREFSORTBY</kbd>,
  2355. <kbd>FAILREFSORTBY</kbd>, <kbd>FULLBROWSORTBY</kbd>, <kbd>BROWSORTBY</kbd>,
  2356. <kbd>OSSORTBY</kbd>,
  2357. <kbd>VHOSTSORTBY</kbd>, <kbd>USERSORTBY</kbd>, <kbd>FAILUSERSORTBY</kbd> and
  2358. <kbd>STATUSSORTBY</kbd>. Again, not every sort method is possible in every
  2359. report, but you'll be warned if you choose an illegal one.
  2360. <p>
  2361. There is one known bug concerned with <kbd>SORTBY ALPHABETICAL</kbd>. The
  2362. report is sorted before any
  2363. <kbd><a href="#OUTPUTALIAS">OUTPUTALIAS</a></kbd> is
  2364. applied. This means that if an <kbd>OUTPUTALIAS</kbd> has been specified for
  2365. the report, then the report will not be sorted correctly.
  2366. <hr>
  2367. <a name="FLOOR">You can also</a> specify a <kbd>FLOOR</kbd> for most reports,
  2368. saying how much
  2369. activity an item needs before it is listed on the report. There are lots
  2370. of possible ways of specifying floors, which I'll list here, using the
  2371. <kbd>DOMFLOOR</kbd> (Domain Report <kbd>FLOOR</kbd>) command as an example.
  2372. Essentially each one consists of a number indicating the level of the floor,
  2373. followed by a letter indicating the floor criterion.
  2374. <pre>
  2375. DOMFLOOR 1000r       # all domains with at least 1000 requests
  2376. DOMFLOOR 1000p       # at least 1000 requests for pages
  2377. DOMFLOOR 1000000b    # at least 1,000,000 bytes transferred
  2378. DOMFLOOR 1Mb         # at least 1 megabyte
  2379. DOMFLOOR 0.5%r       # 0.5% of the requests (ditto %p and %b)
  2380. DOMFLOOR 0.5:r       # 0.5% of the maximum number of requests
  2381.                      # for any domain (ditto :p and :b)
  2382. DOMFLOOR 970701d     # last access since 1st July 1997
  2383. DOMFLOOR -00-01-00d  # last access in last month (see
  2384.                      # documentation on FROM and TO commands)
  2385. DOMFLOOR -100r       # domains with top 100 number of requests
  2386.                      # (ditto -100p, -100b, -100d)
  2387. </pre>
  2388. The other <kbd>FLOOR</kbd> commands are <kbd>HOSTFLOOR</kbd>,
  2389. <kbd>ORGFLOOR</kbd>,
  2390. <kbd>REQFLOOR</kbd>, <kbd>DIRFLOOR</kbd>, <kbd>TYPEFLOOR</kbd>,
  2391. <kbd>REDIRFLOOR</kbd>, <kbd>FAILFLOOR</kbd>, <kbd>REFFLOOR</kbd>,
  2392. <kbd>REFSITEFLOOR</kbd>, <kbd>SEARCHQUERYFLOOR</kbd>,
  2393. <kbd>SEARCHWORDFLOOR</kbd>, <kbd>REDIRREFFLOOR</kbd>,
  2394. <kbd>FAILREFFLOOR</kbd>, <kbd>FULLBROWFLOOR</kbd>, <kbd>BROWFLOOR</kbd>,
  2395. <kbd>OSFLOOR</kbd>,
  2396. <kbd>VHOSTFLOOR</kbd>, <kbd>USERFLOOR</kbd>, <kbd>FAILUSERFLOOR</kbd> and
  2397. <kbd>STATUSFLOOR</kbd>. Once again, not every floor method is legal for
  2398. every report, but you'll be warned if you try and choose an illegal one.
  2399. <hr>
  2400. <a name="othclarg">I've already told you</a> about how to turn each report on
  2401. and off from the
  2402. command line using its <a href="#replist">code letter</a>. In fact,
  2403. you can specify the <kbd>SORTBY</kbd> and the <kbd>FLOOR</kbd> in the same
  2404. command. Take the example of the Referrer Report. If you follow the
  2405. <kbd>+f</kbd> (to turn the report on) with a letter, it represents the
  2406. sort method according to the following code:
  2407. <dl compact>
  2408.   <dt><kbd>r</kbd><dd><kbd>REQUESTS</kbd>
  2409.   <dt><kbd>p</kbd><dd><kbd>PAGES</kbd>
  2410.   <dt><kbd>b</kbd><dd><kbd>BYTES</kbd>
  2411.   <dt><kbd>d</kbd><dd><kbd>DATE</kbd>
  2412.   <dt><kbd>a</kbd><dd><kbd>ALPHABETICAL</kbd>
  2413.   <dt><kbd>x</kbd><dd><kbd>RANDOM</kbd>
  2414. </dl>
  2415. You can then, or alternatively, use one of the above <kbd>FLOOR</kbd> formats
  2416. to specify the floor. If you specify a <kbd>SORTBY</kbd>, you can also leave
  2417. off the last letter of the floor, and analog will guess it according to the
  2418. sort method: the floor will be by pages or bytes if that is the sort method,
  2419. and otherwise by requests. Here are four examples:
  2420. <dl compact>
  2421. <dt><kbd>+fp</kbd><dd>means turn the referrer report on and sort it by page
  2422.     requests, but says nothing about the floor;
  2423. <dt><kbd>+f100r</kbd><dd>means list all referrers with at least 100 requests,
  2424.     but says nothing about the sort method;
  2425. <dt><kbd>+fb10000</kbd><dd>means list all referrers with at least 10,000 bytes,
  2426.     sorted by bytes;
  2427. <dt><kbd>+fa-000101d</kbd><dd>means list all referrers with accesses this year,
  2428.     sorted alphabetically.
  2429. </dl>
  2430.  
  2431. <hr>
  2432. We've already seen some other commands affecting what was listed in the
  2433. non-time reports. The <a href="#outputexcludes">output
  2434. <kbd>INCLUDE</kbd> and <kbd>EXCLUDE</kbd></a> commands specified lines to omit
  2435. from each report, and the
  2436. <kbd><a href="#OUTPUTALIAS">OUTPUTALIAS</a></kbd> commands specified
  2437. some aliasing to do on the names before they were listed. There were also
  2438. <a href="#LINKINCLUDE"><kbd>LINKINCLUDE</kbd> and
  2439. <kbd>LINKEXCLUDE</kbd></a>, and
  2440. <a href="#LINKINCLUDE"><kbd>REFLINKINCLUDE</kbd> and
  2441. <kbd>REFLINKEXCLUDE</kbd></a> commands to control what was linked to in the
  2442. Request Report and the three referrer reports. You might want to have another
  2443. look at these paragraphs.
  2444. <p>
  2445. <a name="BASEURL">There's one other command</a> which affects the links in the
  2446. Request Report.
  2447. The command <kbd>BASEURL</kbd> prepends an additional string to the URLs
  2448. in the target of the link. For example, after the command
  2449. <pre>
  2450. BASEURL http://www.statslab.cam.ac.uk
  2451. </pre>
  2452. <kbd>/~sret1/</kbd> will be linked to
  2453. <kbd>http://www.statslab.cam.ac.uk/~sret1/</kbd>, not just to
  2454. <kbd>/~sret1/</kbd>. This is very useful if you want to display the
  2455. statistics on a different server from the server they refer to. If you want the
  2456. file to be listed as <kbd>http://www.statslab.cam.ac.uk/~sret1/</kbd>, rather
  2457. than just to be linked to that address, you need to use the second argument to
  2458. the <kbd><a href="#secondarg">LOGFILE</a></kbd> command instead.
  2459. <p>
  2460. In the next section, we'll look at commands for generating
  2461. <a href="#hierreps">hierarchical reports</a>, which are closely related
  2462. to the commands in this section.
  2463. <hr>
  2464. <hr>
  2465. <a name="hierreps"><h2>Hierarchical reports</h2>
  2466. </a>
  2467. Some of the non-time reports have a hierarchical (or tree) structure:
  2468. so, for example, each domain in the domain report can have subdomains
  2469. listed under it, which in turn can have sub-subdomains, and so on. This
  2470. section describes commands for managing hierarchical reports.
  2471.  
  2472. <p>
  2473. First, you need to be able to control what gets listed in the reports.
  2474. For this you need to use the <kbd>SUB</kbd> family of commands. So, for
  2475. example, the command
  2476. <kbd>
  2477. SUBDIR /~sret1/*
  2478. </kbd>
  2479. would ensure that the Directory Report would not only contain an entry for
  2480. the sum of my files, but also one for each of my subdirectories, something
  2481. like this:
  2482. <pre>
  2483. 29,111: /~sret1/
  2484. 10,234:   /~sret1/analog/
  2485.  5,179:   /~sret1/backgammon/
  2486. 11,908: /~steve/
  2487. </pre>
  2488. You can have more than one <kbd>*</kbd> in the command. For example
  2489. <pre>
  2490. SUBDOMAIN *.*
  2491. </pre>
  2492. would list the whole Domain Report two levels deep.
  2493.  
  2494. <p>
  2495. If you specify a <kbd>SUB</kbd> command, all the intermediate levels are
  2496. included automatically. So, for example, after
  2497. <pre>
  2498. SUBDOMAIN statslab.cam.ac.uk
  2499. </pre>
  2500. <kbd>cam.ac.uk</kbd> and <kbd>ac.uk</kbd> will be included in the Domain
  2501. Report too, and after <kbd>*.*.ac.uk</kbd>, <kbd>*.ac.uk</kbd> will be
  2502. included.
  2503.  
  2504. <p>
  2505. Here are examples of the other four <kbd>SUB</kbd> commands:
  2506. <pre>
  2507. SUBTYPE *.gz         # in the File Type Report
  2508. SUBBROW */*          # e.g. Mozilla/4 in the Browser Summary
  2509. SUBBROW Mozilla/*.*  # add minor version numbers for Mozilla
  2510. REFDIR http://search.yahoo.com/*   # Referring Site Report
  2511. SUBORG *.aol.com     # Organisation Report
  2512. SUBORG *.*.com       # Break down all .com's
  2513. </pre>
  2514.  
  2515. <p>
  2516. The <kbd>SUBDOMAIN</kbd> report (but none of the others) can included a second
  2517. argument describing the subdomain. For example
  2518. <pre>
  2519. SUBDOMAIN cam.ac.uk 'University of Cambridge'
  2520. </pre>
  2521. Then that subdomain will be listed with its translation in the Domain Report.
  2522. You can also have numerical subdomains: e.g.,
  2523. <pre>
  2524. SUBDOMAIN 131.111 'University of Cambridge'
  2525. </pre>
  2526. If you sort the subdomains alphabetically, the numerical ones will also be
  2527. sorted alphabetically, not numerically. I don't think this will cause any
  2528. problems.
  2529.  
  2530. <p>
  2531. One other use for the <kbd>SUBDIR</kbd> command is if you have used the
  2532. second argument to the <kbd><a href="#secondarg">LOGFILE</a></kbd>
  2533. command. Suppose you have translated files like <kbd>/index.html</kbd> into
  2534. <kbd>http://www.mycompany.com/index.html</kbd>. Then the command
  2535. <pre>
  2536. SUBDIR http://*/*
  2537. </pre>
  2538. would be appropriate to make the directory report look right.
  2539.  
  2540. <hr>
  2541. <a name="SUBFLOOR">The</a> <a name="SUBSORTBY">lower</a> levels of each report
  2542. have <kbd>FLOOR</kbd> and <kbd>SORTBY</kbd>
  2543. commands which work exactly the same as those we have
  2544. <a href="#SORTBY">already seen</a> for the
  2545. top level. These commands are <kbd>SUBDIRFLOOR</kbd>, <kbd>SUBDOMFLOOR</kbd>,
  2546. <kbd>SUBORGFLOOR</kbd>,
  2547. <kbd>SUBTYPEFLOOR</kbd>, <kbd>SUBBROWFLOOR</kbd> and <kbd>REFDIRFLOOR</kbd>;
  2548. and <kbd>SUBDIRSORTBY</kbd>, <kbd>SUBDOMSORTBY</kbd>, <kbd>SUBORGSORTBY</kbd>,
  2549. <kbd>SUBTYPESORTBY</kbd>, <kbd>SUBBROWSORTBY</kbd> and <kbd>REFDIRSORTBY</kbd>.
  2550.  
  2551. <p>
  2552. A sub-item is listed in a hierarchical report only if it is above the
  2553. sub-<kbd>FLOOR</kbd>, <i>and</i> it is included with a <kbd>SUB</kbd> command,
  2554. <i>and</i> it is not excluded because of an
  2555. <a href="#outputexcludes"><kbd>INCLUDE</kbd> or
  2556. <kbd>EXCLUDE</kbd></a> command, <i>and</i> its immediate parent is listed. For
  2557. example, specifying
  2558. <pre>
  2559. SUBDIR /*/*/
  2560. SUBDIRFLOOR -3r
  2561. SUBDIRSORTBY REQUESTS
  2562. </pre>
  2563. would list the three subdirectories with most requests under each directory.
  2564. <kbd>SUBDIRFLOOR 1:r</kbd> would have listed any subdirectory with at least
  2565. 1% of the maximum number of requests of any <em>top level</em> directory.
  2566. <p>
  2567. <a name="ARGSFLOOR">The</a> <a name="ARGSSORTBY">three</a> file reports
  2568. (Request Report, Redirection Report and Failure
  2569. Report) and the three referrer reports (Referrer Report, Redirected Referrer
  2570. Report and Failed Referrer Report) are not fully hierarchical, but they do
  2571. list <a href="#args">search arguments</a> together under the file to which
  2572. they refer (provided that the arguments have been read in: see the
  2573. <kbd><a href="#ARGSINCLUDE">ARGSINCLUDE</a></kbd> command).
  2574. So they have
  2575. similar sub-<kbd>FLOOR</kbd> and sub-<kbd>SORTBY</kbd> commands, namely
  2576. <kbd>REQARGSFLOOR</kbd>, <kbd>REDIRARGSFLOOR</kbd>, <kbd>FAILARGSFLOOR</kbd>,
  2577. <kbd>REFARGSFLOOR</kbd>, <kbd>REDIRREFARGSFLOOR</kbd> and
  2578. <kbd>FAILREFARGSFLOOR</kbd>; and <kbd>REQARGSSORTBY</kbd>,
  2579. <kbd>REDIRARGSSORTBY</kbd>, <kbd>FAILARGSSORTBY</kbd>,
  2580. <kbd>REFARGSSORTBY</kbd>, <kbd>REDIRREFARGSSORTBY</kbd> and
  2581. <kbd>FAILREFARGSSORTBY</kbd>.  The same
  2582. applies to the Operating System Report with its subdivisions of operating
  2583. systems: it has <kbd>SUBOSFLOOR</kbd> and <kbd>SUBOSSORTBY</kbd>.
  2584. <hr>
  2585. The lower levels of a hierarchical report temporarily interrupt the top
  2586. level, and even though they are indented, this can sometimes make it look as
  2587. if the report is out of order. If you have a lot of sub-items, for example in
  2588. the Referrer Report if there are a lot of search arguments, then including the
  2589. <a href="#othCOLS"><kbd>N</kbd> column</a> can help to make it
  2590. clearer again.
  2591. <hr>
  2592. That concludes the description of all the output configuration commands.
  2593. Now we move on to some other individual topics, starting with the
  2594. <a href="#domfile">domains file</a>.
  2595.  
  2596. <hr>
  2597. <hr>
  2598. <a name="domfile"><h2>The domains file</h2>
  2599. </a>
  2600. The domains file tells analog which country is represented by each domain.
  2601. You can tell analog where to find your domains file with a command like
  2602. <pre>
  2603. DOMAINSFILE lang/mydomains.tab
  2604. </pre>
  2605. Normally you don't need this command, because if there is a domains file in
  2606. your language, it should be selected automatically. But the
  2607. <kbd>DOMAINSFILE</kbd> command can be useful if you want to use a domains file
  2608. in a new language, for example.
  2609. <p>
  2610. If you haven't got a domains file, you can download one from
  2611. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/ukdom.tab">http://www.statslab.cam.ac.uk/~sret1/analog/ukdom.tab</a>.
  2612. It should contain on each line a domain code, followed by a number, followed
  2613. by its location, like this:
  2614. <pre>
  2615. ad  2  Andorra
  2616. ae  3  United Arab Emirates
  2617. [...]
  2618. </pre>
  2619. It does not need to be in alphabetical order, though humans may prefer it that
  2620. way. Subdomains do not go in the domains file: you can list them in the Domain
  2621. Report using the <kbd><a href="#hierreps">SUBDOMAIN</a></kbd> command.
  2622.  
  2623. <hr>
  2624. The number beside each domain represents how many levels deep an
  2625. "organisation" is
  2626. considered to be, for the purposes of the Organisation Report. For example,
  2627. consider the hostname <kbd>www.sta.ad</kbd>. The organisation is
  2628. <kbd>sta.ad</kbd>, at the second level, so Andorra has a 2 in the above
  2629. list. But in the UAE, a host looks like <kbd>www.economy.gov.ae</kbd>.
  2630. There is an extra level in the hierarchy, so the UAE has its organisations at
  2631. level 3.
  2632. <p>
  2633. There are some problems with this. A few countries have organisations at both
  2634. levels 2 and 3 (for example <kbd>asaspace.at</kbd> and
  2635. <kbd>univie.ac.at</kbd>). In those cases I've favoured false negatives over
  2636. false positives by using the bigger number. (Also there is a correction which
  2637. will make most of them right again: the first component is always removed from
  2638. a hostname of three or more components.) For other
  2639. countries, I don't have enough information to tell what the level should
  2640. be. I've just given those a 1. Do <a href="#mailing">let me know</a> if
  2641. you have any more information, or corrections, for the numbers.
  2642.  
  2643. <hr>
  2644. If you want HTML special characters in the domains file, you have to
  2645. precede them with a backslash, like this:
  2646. <pre>
  2647. am   Arm\&eacute;nie
  2648. </pre>
  2649.  
  2650. <p>
  2651. Only domains which occur in the domains file will get their own line in the
  2652. Domain Report: the rest are probably spurious, and will be accumulated
  2653. together as "unknown domains". If you have
  2654. <a href="#debugs">debugging</a>
  2655. turned on, you can see which domains were unknown.
  2656.  
  2657. <p>
  2658. Lines starting with a hash (<kbd>#</kbd>) in the domains file are considered
  2659. to be comments.
  2660.  
  2661. <hr>
  2662. <hr>
  2663. <a name="compout"><h2>Computer-readable output style</h2>
  2664. </a>
  2665. This section describes the computer-readable output style. You can select
  2666. this style by means of the command
  2667. <pre>
  2668. OUTPUT COMPUTER
  2669. </pre>
  2670. This style is designed to be easy to read into spreadsheets, or post-process
  2671. with graphics creation tools, for example.
  2672.  
  2673. <p>
  2674. Each line in the output is separated into fields by means of a special string.
  2675. You can specify this string by means of the <kbd>COMPSEP</kbd> command; for
  2676. example
  2677. <pre>
  2678. COMPSEP ,
  2679. </pre>
  2680. for CSV (comma separated value) format. Make sure not to use anything that
  2681. might occur in the output: for example, a single or double space would not be
  2682. suitable.
  2683.  
  2684. <p>
  2685. Each line in the preformatted output begins with a letter indicating which
  2686. report the line is part of. (The code letters for the reports are listed in
  2687. the section on <cite><a href="#replist">Configuring the
  2688. Output</a></cite>.)
  2689. After that, there follows a field indicating the remaining columns in the
  2690. report (using the letters <kbd>RrPpBbD</kbd> as usual). Then there are the
  2691. numerical data and then the name of the item. Times actually take up several
  2692. fields: year, month, date, hour & minute, or as many of those as are
  2693. necessary to identify the time.
  2694.  
  2695. <p>The first line of most reports has <kbd>f</kbd> instead of the normal column
  2696. letters, followed by the floor for the report, in the form it would be written
  2697. for a <kbd><a href="#FLOOR">FLOOR</a></kbd> command, followed by
  2698. the <kbd>SORTBY</kbd> using the code letters
  2699. <dl compact>
  2700.   <dt><kbd>r</kbd><dd><kbd>REQUESTS</kbd>
  2701.   <dt><kbd>p</kbd><dd><kbd>PAGES</kbd>
  2702.   <dt><kbd>b</kbd><dd><kbd>BYTES</kbd>
  2703.   <dt><kbd>d</kbd><dd><kbd>DATE</kbd>
  2704.   <dt><kbd>a</kbd><dd><kbd>ALPHABETICAL</kbd>
  2705.   <dt><kbd>x</kbd><dd><kbd>RANDOM</kbd>
  2706. </dl>
  2707.  
  2708. <p>
  2709. The general summary is a bit different. After an initial <kbd>x</kbd>, there is
  2710. a two-character code saying what the line contains. The possible codes are
  2711. <dl compact>
  2712.   <dt><kbd>VE</kbd><dd>Version of analog
  2713.   <dt><kbd>HN</kbd><dd><kbd>HOSTNAME</kbd>
  2714.   <dt><kbd>HU</kbd><dd><kbd>HOSTURL</kbd>
  2715.   <dt><kbd>PS</kbd><dd>Program start time
  2716.   <dt><kbd>FR</kbd><dd>Time of first request
  2717.   <dt><kbd>LR</kbd><dd>Time of last request
  2718.   <dt><kbd>E7</kbd><dd>Time last 7 days ends
  2719.   <dt><kbd>SR</kbd><dd>Total successful requests
  2720.   <dt><kbd>S7</kbd><dd>Total successful requests in last 7 days
  2721.   <dt><kbd>PR</kbd><dd>Total successful requests for pages
  2722.   <dt><kbd>P7</kbd><dd>Total successful requests for pages in last 7 days
  2723.   <dt><kbd>FL</kbd><dd>Total failed requests
  2724.   <dt><kbd>F7</kbd><dd>Total failed requests in last 7 days
  2725.   <dt><kbd>RR</kbd><dd>Total redirected requests
  2726.   <dt><kbd>R7</kbd><dd>Total redirected requests in last 7 days
  2727.   <dt><kbd>NC</kbd><dd>Logfile lines without status code
  2728.   <dt><kbd>C7</kbd><dd>Lines without status code in last 7 days
  2729.   <dt><kbd>NF</kbd><dd>Number of distinct files requested
  2730.   <dt><kbd>N7</kbd><dd>Number of distinct files requested in last 7 days
  2731.   <dt><kbd>NH</kbd><dd>Number of distinct hosts served
  2732.   <dt><kbd>H7</kbd><dd>Number of distinct hosts served in last 7 days
  2733.   <dt><kbd>CL</kbd><dd>Number of corrupt lines in the logfile
  2734.   <dt><kbd>UL</kbd><dd>Number of unwanted lines in the logfile
  2735.   <dt><kbd>BT</kbd><dd>Total number of bytes transferred
  2736.   <dt><kbd>B7</kbd><dd>Total number of bytes transferred in last 7 days
  2737. </dl>
  2738.  
  2739. <hr>
  2740. <hr>
  2741. <a name="cache"><h2>Cache files</h2>
  2742. </a>
  2743. Analog has the ability to archive <strong>some</strong> of the data in your
  2744. logfile into a <i>cache file</i> so that the logfile can be thrown away
  2745. without losing the most important data.
  2746.  
  2747. <p>
  2748. For most people, the cache file will not be needed: compressing
  2749. the logfile using a standard compression utility such as gzip will be
  2750. sufficient. Compressing a logfile is very efficient owing to the large number
  2751. of repeated strings: I find about 12 times compression in practice. That in
  2752. itself may solve your filespace problems, without needing to throw away any
  2753. information.
  2754.  
  2755. <p>
  2756. The cache file is not the best format for post-processing the data or feeding
  2757. it into a spreadsheet. For that you should use the
  2758. <a href="#compout">computer readable output style</a>.
  2759.  
  2760. <p>
  2761. If you are going to use the cache file feature, it is very important that you
  2762. understand what is and what is not recorded. It is <strong>not</strong>
  2763. possible to reconstruct everything of interest in the logfile from the cache
  2764. file. The cache file does contain information about the total number of
  2765. requests for each host and each file, but not about, for example, which files
  2766. were read by which hosts. (To do so would take up as much disk space as the
  2767. compressed logfile.) So you cannot later look at only one file and see which
  2768. hosts read that file. Similarly, you cannot later restrict the files or hosts
  2769. by date, using <kbd>FROM</kbd> and <kbd>TO</kbd> commands.
  2770. <p>
  2771. In summary, you should do all the inclusions and exclusions you want when you
  2772. create the cache file. If you want different sets of inclusions and exclusions,
  2773. you should create several cache files from the same logfile. You cannot later
  2774. apply extra inclusions and exclusions accurately.
  2775. <p>
  2776. A couple of other minor points: the pattern of failed requests and redirected
  2777. requests over time is not recorded in the cache file. So although the total
  2778. number will still be correct, the number in the last 7 days can be
  2779. under-reported subsequently. And times are only recorded to five-minute
  2780. resolution.
  2781.  
  2782. <hr>
  2783. You can create a cache file by setting the <kbd>CACHEOUTFILE</kbd> to be
  2784. the file you want the cache to live in. Set
  2785. <pre>
  2786. CACHEOUTFILE none
  2787. </pre>
  2788. to turn it off again. You will still get the regular output as well as the
  2789. cache output, unless you request <kbd><a href="#outstyle">OUTPUT
  2790. NONE</a></kbd>. To avoid overwriting, you cannot set the
  2791. <kbd>CACHEOUTFILE</kbd> to be a file which already exists. (Disclaimer: on
  2792. some systems, race conditions may very occasionally thwart this check. Also
  2793. on a few systems, making the file writeable but not readable will allow it to
  2794. be overwritten). You can include the date in the name of the
  2795. <kbd>CACHEOUTFILE</kbd> in the same way as described earlier for the
  2796. <kbd><a href="#OUTFILE">OUTFILE</a></kbd>.
  2797.  
  2798. <p>
  2799. You can read in a previously-made cache file with the <kbd>CACHEFILE</kbd>
  2800. command, or with the <kbd>+U</kbd> command line option. As with the
  2801. <kbd><a href="#logfile">LOGFILE</a></kbd> command, you can use commas
  2802. and wild cards to read in several cache files, and read compressed cache
  2803. files using the <kbd>UNCOMPRESS</kbd> mechanism. Note that if you don't
  2804. want to read a logfile as well as the cache file, you will have to explicitly
  2805. set the <kbd>LOGFILE</kbd> to <kbd>none</kbd>.
  2806. <p>
  2807. When analog reads in a cache file, it will respect inclusions and exclusions
  2808. as far as it can, but it does not apply any more aliases to the items. (This
  2809. is to avoid double-aliasing.) So you must do any aliases you want at the time
  2810. you create the cache file. Similarly, it does not obey the
  2811. <kbd><a href="#TIMEOFFSET">LOGTIMEOFFSET</a></kbd> variable, to
  2812. avoid
  2813. double-offsetting, so any offset you want must be applied at cache-creation
  2814. time too.
  2815. <p>
  2816. Sometimes you don't want to record all the types of item in the cache file.
  2817. You might want to forget about which hosts had accessed your web site, for
  2818. example, and only remember how many times each file was requested. You can
  2819. choose not to include one type of item in the cache file by setting its
  2820. <kbd><a href="#lowmem">LOWMEM</a></kbd> to 3; for example, specify
  2821. <pre>
  2822. HOSTLOWMEM 3
  2823. </pre>
  2824. to exclude hosts from the cache file. Because this is a serious
  2825. step, analog will produce a warning if you do this. You can even set all six
  2826. <kbd>LOWMEM</kbd>s to 3 if you just want to remember the pattern of requests
  2827. over time, not even which files were requested.
  2828.  
  2829. <hr>
  2830. When using the cache files, you have to be careful to store separate data in
  2831. each cache file. So you shouldn't use an old cache file to make a new cache
  2832. file, and then analyse both cache files together. And you shouldn't use the
  2833. same logfile to make two different cache files, and then analyse both cache
  2834. files together. To avoid losing entries or double counting them, I suggest you
  2835. follow the following procedure.
  2836. <ol>
  2837.   <li>Archive the old logfile, and restart the server with a fresh logfile.
  2838.       (See your server documentation for how to do this.)
  2839.   <li>Make both a cache file and an ordinary report from the old logfile.
  2840.   <li>Make a test report from the cache file and compare it against the report
  2841.       from the logfile to check it works. (This step really is worth doing!)
  2842.   <li>Make the main report from all your cache files, old and new.
  2843. </ol>
  2844. Now you can throw away the old logfile, if you've really understood what
  2845. data you're losing by doing so. (But please remember that I can take no
  2846. responsibility if something goes wrong: see the
  2847. <a href="Licence.txt">licence</a>.)
  2848. <p>
  2849. I prefer to make a separate cache file from each logfile, in case something
  2850. goes wrong with one of them, rather than a single cache file combining several
  2851. logfiles, or a single cache file combining an old cache file and a logfile.
  2852.  
  2853. <hr>
  2854. <hr>
  2855. <a name="dns"><h2>DNS lookups</h2>
  2856. </a>
  2857. Sometimes a logfile contains numerical IP addresses - like 131.111.20.59 -
  2858. for the computers that have visited you, instead of names like
  2859. lion.statslab.cam.ac.uk. This section describes how you can get analog
  2860. to do so-called <i>DNS lookups</i> to translate these numbers into names.
  2861. This relies on you having a suitably configured system: DNS lookups are
  2862. not possible on some systems.
  2863. <p>
  2864. Unfortunately DNS lookups are typically very slow, because your computer
  2865. has to ask across the network to find out the names of the hosts. For this
  2866. reason, analog saves the addresses it has looked up in a file, so that you
  2867. don't have to look them up again next time. (Even so, you may find the DNS
  2868. lookups too slow to be usable.) The file is specified by a command like
  2869. <pre>
  2870. DNSFILE dnsfile.txt
  2871. </pre>
  2872. You will still need to use one of the commands in the next paragraph
  2873. in order to actually use the file.
  2874.  
  2875. <p>
  2876. There are four possible levels of DNS activity. If you specify
  2877. <kbd>DNS NONE</kbd>, no numerical addresses will be resolved. If you specify
  2878. <kbd>DNS READ</kbd>, then analog will read the DNS file for old lookups, but
  2879. no new lookups will take place. This mode is suitable if you are running
  2880. analog while not connected to the internet. The third level is
  2881. <kbd>DNS WRITE</kbd>. This reads the old file, looks up new addresses,
  2882. and adds them to the file. (The first time you use <kbd>DNS WRITE</kbd>, you
  2883. will get a missing-file warning as it tries to read the old file, but it will
  2884. exist the next time.) The final level is <kbd>DNS LOOKUP</kbd>. This
  2885. reads the old file and looks up new addresses, but doesn't add the new
  2886. addresses to the file, so that they will not be remembered for next time.
  2887. This is not normally a level that the user wants to specify, but analog will
  2888. switch to this the behaviour if <kbd>DNS WRITE</kbd> fails for some reason.
  2889.  
  2890. <p>
  2891. If you are using a <kbd><a href="#include">HOSTEXCLUDE</a></kbd> command,
  2892. you need to exclude the numerical IP address if it can't be resolved, or the
  2893. name if it can. In other words, exclude whatever the host is known as in the
  2894. report.
  2895.  
  2896. <hr>
  2897. If two copies of analog were allowed to write to the DNS file at the
  2898. same time, the file could become corrupted. So when analog is running in
  2899. <kbd>DNS WRITE</kbd> mode, it creates a <em>lock file</em> which tells other
  2900. copies of analog to back off to <kbd>DNS LOOKUP</kbd>. You can change the
  2901. location of that file with the command
  2902. <pre>
  2903. DNSLOCKFILE filename
  2904. </pre>
  2905. Of course you should make sure that all copies of analog use the same lock
  2906. file, at least if they have the same DNS file! If analog crashes, it may not
  2907. clear up the lock file, so in that case you may have to delete it yourself.
  2908. (Disclaimer: on some systems, race conditions may occasionally thwart this
  2909. mechanism, but this is very unlikely.)
  2910.  
  2911. <p>
  2912. Analog never deletes anything from the DNS file: this means that the DNS
  2913. file will grow, and can become quite large. You should delete the top of
  2914. it every so often.
  2915.  
  2916. <p>
  2917. There are two parameters which say how long to trust old lookups for.
  2918. If you set
  2919. <pre>
  2920. DNSGOODHOURS 672
  2921. </pre>
  2922. for example, then successful lookups will be checked again after 672 hours
  2923. (4 weeks). You can also set the <kbd>DNSBADHOURS</kbd> similarly, to check
  2924. failed lookups again after a certain time.
  2925.  
  2926. <p>
  2927. Finally, there is a <a href="#debugs">debugging</a> command,
  2928. <kbd>DEBUG +D</kbd> to show all the DNS lookups that analog is making.
  2929.  
  2930. <hr>
  2931. There are lots of tools to help with the DNS lookups on the
  2932. <a href="#helpers">helper applications</a> page.
  2933.  
  2934. <hr>
  2935. Normally you need never write a DNS file: you should rely on analog to do it
  2936. for you. But in case you need to know, the format of the file is
  2937. <pre>
  2938. timestamp IP_address name
  2939. </pre>
  2940. where the timestamp is the number of minutes since the beginning of 1970, GMT
  2941. (i.e., "Unix time" divided by 60), and the name is just <kbd>*</kbd>
  2942. if the address couldn't be resolved.
  2943.  
  2944. <hr>
  2945. <hr>
  2946. <a name="lowmem"><h2>Coping with low memory</h2>
  2947. </a>
  2948. This section describes how to run analog with lower amounts of memory. For
  2949. a normal logfile this will make analog run a bit slower. But if your computer
  2950. is running out of memory when running analog, it will go very slowly indeed:
  2951. so for large logfiles, this can make analog run much faster, or even make an
  2952. analysis possible that wouldn't otherwise be possible.
  2953.  
  2954. <p>
  2955. Recall what happens to an item when it has been read in. First it is
  2956. <a href="#alias">aliased</a>. Secondly, it is checked to see whether
  2957. it is <a href="#include">included or excluded</a>. Then finally, if all
  2958. the items are wanted, one request is added to its score.
  2959.  
  2960. <p>
  2961. Normally the name of the item is saved before the aliasing takes place. This
  2962. avoids analog having to do the aliasing again next time the same item is
  2963. encountered. But this can take up more memory than necessary. So there is a
  2964. family of <kbd>LOWMEM</kbd> commands provided, which tell analog to record the
  2965. name at a later stage, or even not at all. If you use these commands, analog
  2966. will have to do a bit more work than normal, but it will use less memory.
  2967. On most sites, the hosts take up most of the memory, so I'll use the
  2968. <kbd>HOSTLOWMEM</kbd> command as an example.
  2969.  
  2970. <p>
  2971. The command
  2972. <pre>
  2973. HOSTLOWMEM 0
  2974. </pre>
  2975. represents the normal case, when the hostname is recorded before being aliased.
  2976. If you specify
  2977. <pre>
  2978. HOSTLOWMEM 1
  2979. </pre>
  2980. instead, then the hostname is not recorded until after the aliasing. If you
  2981. specify
  2982. <pre>
  2983. HOSTLOWMEM 2
  2984. </pre>
  2985. then the name is not recorded until after the inclusion and exclusion lookup
  2986. has been done as well. And finally, if you give the command
  2987. <pre>
  2988. HOSTLOWMEM 3
  2989. </pre>
  2990. then the hostname is not saved at all, and the Host Report will not be
  2991. constructed, even if you've asked for it. (The Domain Report can still be
  2992. constructed though.) The analogous commands for the other items are
  2993. <kbd>FILELOWMEM</kbd>, <kbd>BROWLOWMEM</kbd>, <kbd>REFLOWMEM</kbd>,
  2994. <kbd>USERLOWMEM</kbd> and <kbd>VHOSTLOWMEM</kbd>.
  2995.  
  2996. <hr>
  2997. So what should you do if analog runs out of memory? First, look in your
  2998. logfile to see which items are taking up all the memory. If you have lots
  2999. of different filenames, ones you generate on the fly for example, you would
  3000. want to use the <kbd>FILELOWMEM</kbd> commands. Maybe you could combine all
  3001. the similar filenames into one with a <kbd>FILEALIAS</kbd> command, and use
  3002. <kbd>FILELOWMEM 1</kbd>. (If you have lots of different filenames caused by
  3003. different search arguments, then using
  3004. <kbd><a href="#ARGSEXCLUDE">ARGSEXCLUDE</a></kbd> might solve your
  3005. problem
  3006. without any need to use <kbd>LOWMEM</kbd> at all). But for most users, it
  3007. is the hostnames which cause the problem. If you only want to analyse requests
  3008. from certain hosts, then you could use <kbd>HOSTLOWMEM 2</kbd> to exclude
  3009. the others before recording those that are left. If you don't want to exclude
  3010. any hosts, and you haven't got enough memory to record all the different
  3011. hostnames, then <kbd>HOSTLOWMEM 3</kbd> would be appropriate.
  3012. <hr>
  3013. <hr>
  3014. <a name="debug"><h2>Debugging</h2>
  3015. </a>
  3016. This section lists commands to help you debug analog, if you think it's
  3017. going wrong. There's another section later which lists all the
  3018. <a href="#errors">errors and warnings</a> which analog can generate,
  3019. and what they all mean, and another section which tells you
  3020. <a href="#mailing">how to report bugs</a>.
  3021.  
  3022. <p>
  3023. First, remember the option we mentioned before, to list the current settings
  3024. of all of analog's variables. To get this, just put <kbd>-settings</kbd> on
  3025. the command line, or <kbd>SETTINGS ON</kbd> in one of your configuration
  3026. files, along with your other commands. Then analog will produce the list of
  3027. settings instead of running in the normal way.
  3028.  
  3029. <hr>
  3030. <a name="debugs">There are commands</a> which control how much debugging
  3031. information and warning
  3032. information analog gives out while it is running. By default you get all the
  3033. warnings and no debugging, but you can change this by means of the commands
  3034. <kbd>DEBUG</kbd> and <kbd>WARNINGS</kbd>. If you say
  3035. <pre>
  3036. DEBUG ON
  3037. </pre>
  3038. you get all the debugging. (And <kbd>DEBUG OFF</kbd> turns it all off.)
  3039. You can also get just certain categories of debugging. The categories are
  3040. <dl compact>
  3041.   <dt><kbd>C</kbd><dd>list all corrupt logfile lines
  3042.   <dt><kbd>D</kbd><dd>information about DNS lookups
  3043.   <dt><kbd>F</kbd><dd>information about file opening and closing
  3044.   <dt><kbd>S</kbd><dd>summary information about each logfile when it's closed
  3045.   <dt><kbd>U</kbd><dd>list unknown domains
  3046.   <dt><kbd>V</kbd><dd>list hosts without a domain (i.e., without a dot)
  3047. </dl>
  3048. So, for example, the command
  3049. <pre>
  3050. DEBUG FS
  3051. </pre>
  3052. would give you information about file opening and closing, and what was in
  3053. each logfile, but none of the other sorts of debugging. Each line of debugging
  3054. information is prepended with its code letter. You can also specify
  3055. <pre>
  3056. DEBUG +CD
  3057. </pre>
  3058. to add <kbd>C</kbd> and <kbd>D</kbd> category debugging to whatever you've
  3059. already got, and
  3060. <pre>
  3061. DEBUG -CD
  3062. </pre>
  3063. to remove those two categories.
  3064. <p>
  3065. There is also a command line abbreviation for this command. Use
  3066. <kbd>+V</kbd> (for <kbd>ON</kbd>), <kbd>-V</kbd> (for <kbd>OFF</kbd>),
  3067. <kbd>+VFS</kbd> (to select exactly options <kbd>FS</kbd>), <kbd>+V+FS</kbd>
  3068. (to add those options), and <kbd>+V-FS</kbd> (to remove them).
  3069. <p>
  3070. The <kbd>C</kbd> messages actually come on two lines. The first line gives the
  3071. logfile line which was corrupt. The second line indicates where analog first
  3072. noticed a problem. (This is usually, but not always, close to where the
  3073. problem
  3074. actually was!) In fact, each "line" of the message may spread over
  3075. more than one line on your screen, and you have to be careful to take that into
  3076. account when trying to find out where the logfile line was corrupt.
  3077. <hr>
  3078. <a name="WARNINGS">The <kbd>WARNINGS</kbd></a> command acts similarly. As well
  3079. as <kbd>WARNINGS
  3080. ON</kbd> and <kbd>WARNINGS OFF</kbd>, there are warnings in the following
  3081. categories.
  3082. <dl compact>
  3083.   <dt><kbd>C</kbd><dd>invalid configuration specified
  3084.   <dt><kbd>D</kbd><dd>dubious configuration specified
  3085.   <dt><kbd>E</kbd><dd><kbd>ERRFILE</kbd> command used (see below)
  3086.   <dt><kbd>F</kbd><dd>files missing or corrupt
  3087.   <dt><kbd>L</kbd><dd>apparent problems in logfiles
  3088.   <dt><kbd>M</kbd><dd>possibly problems in logfiles
  3089.   <dt><kbd>R</kbd><dd>turning off empty reports
  3090. </dl>
  3091. Warnings range from the probably harmless to the usually serious.
  3092. See the section on <cite><a href="#warns">Errors and
  3093. warnings</a></cite> for more details about the various categories. Again,
  3094. warnings are printed with their code letters.
  3095. <p>
  3096. There is also a command line version of the <kbd>WARNINGS</kbd> command,
  3097. looking like <kbd>+q</kbd>, <kbd>-q</kbd>, <kbd>+q<options></kbd>,
  3098. <kbd>+q+<options></kbd> or <kbd>+q-<options></kbd>.
  3099. <hr>
  3100. <a name="PROGRESSFREQ">There is one more command</a> which is useful when
  3101. trying to debug analog. If you give the command
  3102. <pre>
  3103. PROGRESSFREQ 20000  # say
  3104. </pre>
  3105. then analog will produce a little message after every 20,000 lines it reads
  3106. from the logfile. This is useful to determine whether the program has really
  3107. stopped or (as is more likely) is just being slow for some reason (such as
  3108. using DNS lookups).
  3109. <hr>
  3110. <a name="ERRFILE">To start with</a>, all these messages go to <i>standard
  3111. error</i>, which is
  3112. normally just the screen. But you can change that by means of a command like
  3113. <pre>
  3114. ERRFILE newfile
  3115. </pre>
  3116. If you do this, analog will warn you that it's redirecting the messages, just
  3117. so that you don't miss any. To change back to standard error, use
  3118. <pre>
  3119. ERRFILE stderr
  3120. </pre>
  3121. The <kbd>ERRFILE</kbd> command will erase any previous contents of that
  3122. file. (So don't use the same <kbd>ERRFILE</kbd> command twice, or you may lose
  3123. messages!)
  3124. <hr>
  3125. <a name="ERRLINELENGTH">There is a command</a> called <kbd>ERRLINELENGTH</kbd>
  3126. to tell analog the width of screen you want these messages to fit in. As a
  3127. special case,
  3128. <pre>
  3129. ERRLINELENGTH 0
  3130. </pre>
  3131. specifies an unlimited screen width.
  3132. <hr>
  3133. There is just one more section about analog's configuration commands and
  3134. command line arguments, but it's a rather long one, on the
  3135. <a href="#form">form interface</a>. (This is a way of running analog by
  3136. selecting options from a web page.) You might prefer to go straight onto the
  3137. section on <cite><a href="#meaning">What the results mean</a></cite>.
  3138. <hr>
  3139. <hr>
  3140. <a name="form"><h2>Form interface and CGI program</h2>
  3141. </a>
  3142. The form interface provides an HTML front end to analog, on Unix or Windows
  3143. platforms (and maybe others). That means that users can select options from a
  3144. web page, instead of having to create a configuration file.
  3145.  
  3146. <p>
  3147. <strong>Important:</strong> For <strong><a href="#notcgi">security
  3148. reasons</a></strong>, you must not attempt to run analog itself as a CGI
  3149. program, or even leave it in the directory or folder with your web files or
  3150. CGI programs. When the form interface runs analog for you, it checks that
  3151. analog isn't given any dangerous options. Without this check, your system
  3152. could be vulnerable to attack.
  3153.  
  3154. <p>
  3155. Please don't try and set up the form until analog has been set up and is
  3156. running properly on its own. It just adds another level of complexity to
  3157. troubleshoot. And unlike analog itself, the form interface will <em>not</em>
  3158. run "out of the box". You have to read this section to find out how
  3159. to set it up.
  3160.  
  3161. <p>
  3162. The form interface is suitable for ordinary users to use, but it <b>needs to be
  3163. set up by a system administrator</b> or other expert. In order to set it up,
  3164. you have to be running a web server. You need to know what CGI programs
  3165. are, where they live on your server, and how to set up their permissions
  3166. properly. You also need to know how to write HTML forms. I shall assume this
  3167. level of background knowledge for the rest of this section. And you have to be
  3168. running Perl 5.001 or later: see <cite><a href="#formtech">Technical
  3169. details</a></cite> below for other system requirements. (Actually, if you're
  3170. on Windows and don't have Perl, you can download an executable version of the
  3171. form interface from the <a href="#helpers">helper applications page</a>.)
  3172.  
  3173. <p>
  3174. <strong>Warning:</strong> CGI programs can contain security loopholes which
  3175. allow an unscrupulous user to harm your system. (If you don't know about this,
  3176. you shouldn't be running CGI programs at all. Read and understand the
  3177. <a href="http://www.w3.org/Security/Faq/">World Wide Web Security FAQ</a> and
  3178. the <a href="http://www.go2net.com/people/paulp/cgi-security/safe-cgi.txt">CGI
  3179. Security FAQ</a> first.) I have tried to make this form interface safe, but I
  3180. cannot guarantee it. Even the most carefully-designed CGI programs can
  3181. accidentally have serious security bugs. And I take no responsibility if
  3182. anything goes wrong: you use it at your own risk. (See the
  3183. <a href="Licence.txt">licence</a>.)  Furthermore, you should be aware that
  3184. unless you take special measures like password protection or limiting
  3185. <kbd>anlgform.pl</kbd> to specific hostnames, setting up the form interface
  3186. implies making analog executable, and your logfiles analysable, by anyone on
  3187. the internet. There are more <a href="#security">notes on security design</a>
  3188. in this program towards the end of this section.
  3189.  
  3190. <p>
  3191. The form interface consists of two parts: a form (called
  3192. <kbd>anlgform.html</kbd>) to choose the options, and a cgi program (called
  3193. <kbd>anlgform.pl</kbd>) to pass them to the analog
  3194. program. Both <kbd>anlgform.html</kbd> and <kbd>anlgform.pl</kbd> <b>must</b>
  3195. be configured to your system before they will work at all. There are
  3196. instructions at the top of both files explaining how to do this.
  3197.  
  3198. <p>
  3199. The form which is distributed with the program should only be regarded as an
  3200. example form. You can find forms in languages other than English in the
  3201. <kbd>lang</kbd> directory. Or you can write your own if you prefer. In fact
  3202. you don't actually need the form at all: if you want just to create a link
  3203. to the cgi program, with the arguments passed after a question mark in the URL
  3204. in the usual way, then that's fine.
  3205.  
  3206. <hr>
  3207. Almost every analog configuration command can be specified on the form, just
  3208. by including a form element with that name on the form. So, for example, if
  3209. you wanted to add a field for users to choose a logfile, you could write
  3210. <pre>
  3211. Logfile name: <input type=text name="LOGFILE">
  3212. </pre>
  3213. or maybe something like
  3214. <pre>
  3215. <select name=LOGFILE size=1>
  3216.   <option value="/var/log/apache/fred"> Fred's logfile
  3217.   <option value="/var/log/apache/jane"> Jane's logfile
  3218. </select>
  3219. </pre>
  3220.  
  3221. <p>
  3222. There are a few commands which you can't specify on the form for security or
  3223. performance reasons. The full list is <kbd>*LOGFORMAT</kbd>,
  3224. <kbd>LANGFILE</kbd>, <kbd>HEADERFILE</kbd>, <kbd>FOOTERFILE</kbd>,
  3225. <kbd>UNCOMPRESS</kbd>, <kbd>OUTFILE</kbd>, <kbd>CACHEOUTFILE</kbd>,
  3226. <kbd>ERRFILE</kbd>, <kbd>DNS</kbd> and <kbd>SETTINGS</kbd>;
  3227. and the person setting up the form can add more. There are also certain
  3228. arguments you can't give to commands: the most important is that you can't
  3229. include the wildcard <kbd>*</kbd> in the <kbd>LOGFILE</kbd>. See the
  3230. <a href="#security">security notes</a> below for the reasons for these
  3231. exclusions, and for some more commands you might want to add to the forbidden
  3232. list.
  3233.  
  3234. <hr>
  3235. Some commands are most conveniently specified in two halves. First, there are
  3236. commands which take two arguments (for example
  3237. <a href="#alias"><kbd>ALIAS</kbd>es</a>). You can cope with these by
  3238. sending two commands from the form, called <kbd>COMMAND1</kbd> and
  3239. <kbd>COMMAND2</kbd>. For example,
  3240. <pre>
  3241. Alias this file: <input type=text name="FILEALIAS1">
  3242. To this one: <input type=text name="FILEALIAS2">
  3243. </pre>
  3244. You can only specify one such pair this way; so there's no way to specify
  3245. several of the same <kbd>ALIAS</kbd>, for example.
  3246.  
  3247. <p>
  3248. Then there are <a href="#FLOOR"><kbd>FLOOR</kbd></a> commands. To
  3249. avoid users of the form having to know the syntax of these commands, you can
  3250. if you want specify them in two halves, <kbd>FLOORA</kbd> and
  3251. <kbd>FLOORB</kbd>, and they will be stuck together. For example, the form
  3252. distributed with the program specifies
  3253. <pre>
  3254. <br>Include all domains with at least
  3255. <input type=TEXT name="DOMFLOORA" maxlength=6 size=6>
  3256. <select name="DOMFLOORB">
  3257.   <option value=r>requests
  3258.   <option value=p>requests for pages
  3259.   <option value=b selected>bytes
  3260. </select>
  3261. </pre>
  3262. If <kbd>DOMFLOORA</kbd> contains <kbd>5%</kbd> and <kbd>DOMFLOORB</kbd>
  3263. contains <kbd>r</kbd>, then <kbd>DOMFLOOR 5%r</kbd> will be sent to the
  3264. program. (Or <kbd>DOMFLOORA=5</kbd> and <kbd>DOMFLOORB=%r</kbd> would work
  3265. too, if you chose to present the form that way.)
  3266.  
  3267. <hr>
  3268. <a name="formqv">There are a couple</a> of extra non-analog commands which can
  3269. be sent from the form. First, if the option <kbd>qv=1</kbd> is set, then
  3270. analog is not run, but a list of the configuration commands which would have
  3271. been sent to analog is printed instead. This is useful for checking that the
  3272. CGI program is working properly. It can also allow users to produce a
  3273. configuration file from form settings.
  3274.  
  3275. <p>
  3276. Secondly, you can specify other configuration files to be included at specific
  3277. times. When analog is called by the CGI program, it first processes the
  3278. <a href="#specialcfgs">default configuration file</a> as usual.
  3279. Then it processes any configuration file specified by an option with name
  3280. <kbd>cg</kbd>. Then it processes all the other commands which the CGI program
  3281. specifies. After that, it processes any configuration file specified by an
  3282. option with name <kbd>cm</kbd>. Finally, it processes the
  3283. <a href="#specialcfgs">mandatory configuration file</a> as usual.
  3284. (You may therefore want two copies of analog, one for form use and one for
  3285. non-form use, with different configuration files compiled in.) Note that
  3286. the commands in the default and mandatory configuration files will contribute
  3287. to the configuration: some of them may even override options specified on the
  3288. form. For example, if the default configuration file contains an
  3289. <kbd><a href="#include">INCLUDE</a></kbd> command, this may cause
  3290. <kbd>INCLUDE</kbd> and <kbd>EXCLUDE</kbd> commands specified on the form to
  3291. behave unexpectedly.
  3292.  
  3293. <hr>
  3294. <kbd>anlgform.pl</kbd> usually sends the commands to analog in the order in which
  3295. it received them, which should be the same as the order they occurred in the
  3296. form. But there are some exceptions. First, all commands of the same name are
  3297. grouped together. So an interleaved sequence of <kbd>INCLUDE</kbd>s and
  3298. <kbd>EXCLUDE</kbd>s won't work, for example. Secondly, even though the names
  3299. of commands are case-insensitive, commands of the same name but in different
  3300. cases may come in the wrong order. Keep them in the same case! Thirdly,
  3301. <kbd>WARNINGS</kbd> and <kbd>LOGTIMEOFFSET</kbd> are sent first (and thus the
  3302. <kbd>LOGTIMEOFFSET</kbd> applies to any logfiles specified on the form).
  3303.  
  3304. <p>
  3305. <a name="formalways">There are</a> a couple of commands which the form always
  3306. sets. These may override what you have set elsewhere. First, it sets either
  3307. <kbd>DNS READ</kbd> (if a <kbd>DNSFILE</kbd> is set on the form) or <kbd>DNS
  3308. NONE</kbd> (otherwise). You can override this behaviour in the mandatory
  3309. configuration file, but you are likely to run into timeout problems if you
  3310. do. Secondly, it always sets <kbd>WARNINGS FL</kbd>, so that the less
  3311. important warnings don't fill up your server's error log. You can override
  3312. this by sending an explicit <kbd>WARNINGS</kbd> command from the form.
  3313.  
  3314. <p>
  3315. <a name="formuncompress">There is one small point</a> about compressed
  3316. logfiles. For security reasons, when using the form interface you need to
  3317. specify the full pathname to the uncompression command in the
  3318. <kbd><a href="#UNCOMPRESS">UNCOMPRESS</a></kbd> command in your
  3319. configuration file.
  3320.  
  3321. <hr><h3><a name="trouble">Troubleshooting</a></h3>
  3322. Here is what to do if you are having problems setting up the form interface.
  3323.  
  3324. <p>
  3325. First, you can run <kbd>anlgform.pl</kbd> from the (DOS or Unix) command
  3326. line. This is good enough to debug most problems. You can specify options in
  3327. pairs like this:
  3328. <pre>
  3329. anlgform.pl qv=1 LOGFILE=/some/log REQINCLUDE=pages
  3330. </pre>
  3331. If you include <kbd>qv=1</kbd> in the argument list as above, you will see
  3332. what <kbd>anlgform.pl</kbd> is trying to send to analog. If you don't include
  3333. <kbd>qv=1</kbd>, <kbd>anlgform.pl</kbd> will try and run analog.
  3334.  
  3335. <p>If it still doesn't work, check the following points:
  3336. <ol>
  3337.   <li>Have you edited <kbd>anlgform.pl</kbd> and <kbd>anlgform.html</kbd> as
  3338.       instructed at the top of those files?
  3339.   <li>Do other CGI programs work on your server? Is <kbd>anlgform.pl</kbd> in
  3340.       the right place to be recognised as a CGI program by the server?
  3341.   <li>Look in the server's error log for clues.
  3342.   <li>Are all relevant files (analog itself, logfiles, configuration files,
  3343.       auxiliary files such as domain files...) executable/readable by your web
  3344.       server?
  3345.   <li>If some form options don't seem to take effect, then check whether they
  3346.       are being overridden by a command in a configuration file.
  3347.   <li>If you get a long wait, then no data returned, the server is probably
  3348.       timing out the request before analog has finished. The remedy is to
  3349.       increase the timeout interval.
  3350.   <li>As explained <a href="#formalways">above</a>, the form always sets
  3351.       <kbd>DNS READ</kbd> or <kbd>DNS NONE</kbd>, and <kbd>WARNINGS FL</kbd>,
  3352.       overriding your default configuration file.
  3353.   <li>Again as explained <a href="#formuncompress">above</a>, uncompressing of
  3354.       compressed logfiles doesn't work unless you use the full pathname in the
  3355.       <kbd>UNCOMPRESS</kbd> command.
  3356. </ol>
  3357.  
  3358. <hr><h3><a name="security">Security notes</a></h3>
  3359.  
  3360. As I said above, CGI programs can often contain security loopholes. Although I
  3361. <a href="Licence.txt">don't guarantee</a> that the form interface is safe, I
  3362. have done my best to make it so. Here I shall explain my design decisions.
  3363. Comments on them are of course welcome: if they need to remain confidential,
  3364. you can e-mail me privately at <kbd><a href="mailto:analog-author@lists.isite.net">analog-author@lists.isite.net</a></kbd>.
  3365. <p>
  3366. First, you should think about who can run the form interface. Unless you take
  3367. special measures like password protection or limiting <kbd>anlgform.pl</kbd>
  3368. to specific hostnames, adding the form interface to your site implies making
  3369. analog executable, and your logfiles analysable, by anyone on the internet.
  3370. There are obvious concerns both about privacy and about the load on your
  3371. system.
  3372. <p>
  3373. Certain commands are ignored by <kbd>anlgform.pl</kbd> and not passed to
  3374. analog. The list of them can be found at the top of <kbd>anlgform.pl</kbd>.
  3375. Here are the reasons for them. <kbd>HEADERFILE</kbd> and <kbd>FOOTERFILE</kbd>
  3376. would place any file on your system within the output. The
  3377. <kbd>*LOGFORMAT</kbd> commands would also allow any file to be read, because
  3378. someone could designate each line to be a single filename and then just list
  3379. the filenames. <kbd>OUTFILE</kbd>, <kbd>CACHEOUTFILE</kbd> and
  3380. <kbd>ERRFILE</kbd> would allow people to write to your filespace;
  3381. <kbd>ERRFILE</kbd> would also divert errors away from your error log.
  3382. <kbd>UNCOMPRESS</kbd> would allow a user to execute any command. <kbd>DNS</kbd>
  3383. is forbidden because setting it higher than <kbd>READ</kbd> would normally
  3384. cause the process to time out.
  3385. <p>
  3386. None of the above should be deleted (unless you are really, really sure that
  3387. it's completely impossible for anyone other than yourself to run
  3388. <kbd>anlgform.pl</kbd>). There are two other commands which are forbidden by
  3389. default but which you could consider removing from the forbidden list.
  3390. <kbd>SETTINGS</kbd> is included because it will give away the locations of
  3391. some files on your system. But it is useful for diagnostic purposes, and you
  3392. could consider removing it temporarily if you have trouble setting up the
  3393. form. The other command which is included is <kbd>LANGFILE</kbd>, although I
  3394. consider it to be a lower risk. It is included because it is theoretically
  3395. possible that another file could be exactly the right number of lines long to
  3396. be accepted as a language file, and then parts of it would get into the
  3397. output. But it would have to be exactly the right length first. If that's a
  3398. risk you're prepared to take, you can remove <kbd>LANGFILE</kbd> from the list.
  3399. <p>
  3400. There are other commands which you might consider adding to the list. For
  3401. example, it is theoretically possible (though rather unlikely), that another
  3402. file on your system could conform sufficiently closely to one of the
  3403. predefined log formats that analog could be persuaded to analyse it and so
  3404. reveal some of its contents. If you're worried about this, or even if you want
  3405. to force only one particular logfile to be analysed from the form, you can add
  3406. the <kbd>LOGFILE</kbd> command to the list of forbidden commands. And you could
  3407. add <kbd>DOMAINSFILE</kbd> for similar reasons.
  3408. <p>
  3409. You can of course add any command you like to the list. For example, 
  3410. a user can use any configuration file on your system unless you add all of
  3411. <kbd>CONFIGFILE</kbd>, <kbd>CM</kbd> and <kbd>CG</kbd>.
  3412. Or if you wanted to stop a user having control of which warnings were written
  3413. to the error log, you could add <kbd>WARNINGS</kbd>.
  3414. <hr>
  3415. For those who know about CGI security issues, here are some more technical
  3416. comments on my design. <kbd>anlgform.pl</kbd> sets the <kbd>$PATH</kbd>
  3417. environment variable to be empty. It opens <kbd>analog</kbd> as a pipe in
  3418. order to pass arguments into analog's standard input. User-specified data is
  3419. not used for the <kbd>open()</kbd> function, only passed down the pipe.
  3420. <kbd>anlgform.pl</kbd> is run with the <kbd>-T</kbd> flag on Unix. (Does
  3421. anyone know how to get this working under Windows?)
  3422. <p>
  3423. The arguments to <kbd>LOGFILE</kbd> and <kbd>CACHEFILE</kbd> commands are
  3424. checked for containing only certain allowed characters (specifically, letters,
  3425. digits, <kbd>/\.:_</kbd> space, and <kbd>-</kbd> between two {letter, digit,
  3426. underscore}'s). This is because they could match an <kbd>UNCOMPRESS</kbd>
  3427. command and thus be passed to the shell when the uncompress command is
  3428. <kbd>popen()</kbd>'ed.
  3429. <p>
  3430. Apart from that, command names are checked for containing only letters and the
  3431. digits 1 and 2; and the arguments to commands are checked for not containing
  3432. control characters (actually characters 0-32 and 127-159; in particular
  3433. newline characters are prohibited). The length of the commands isn't checked
  3434. by <kbd>anlgform.pl</kbd>, but buffer overflow shouldn't be an issue as
  3435. configuration commands are checked for length by analog.
  3436. <p>
  3437. <a name="notcgi">By the way</a>, the reason that I advise that analog itself
  3438. shouldn't be used as a CGI program is that some servers, notably Microsoft
  3439. IIS, allow users to pass command line arguments into a CGI program. And even
  3440. if the program doesn't return the proper CGI headers, the output can be sent
  3441. back to the user. This means that all the above checking of arguments is then
  3442. thwarted. Of course, on servers on which you can't pass command line arguments
  3443. to a CGI program, there are not the same security concerns, but then analog
  3444. isn't very useful as a CGI program because if you can't pass any arguments,
  3445. you can only get the default output.
  3446.  
  3447. <hr><h3><a name="formtech">Technical details</a></h3>
  3448. You need to be running Perl 5.001 or later (unless you're on Windows and
  3449. download the executable version of the form interface from the
  3450. <a href="#helpers">helper applications page</a>). You can get the latest
  3451. version of Perl free from <a href="http://www.perl.org">www.perl.org</a>. You
  3452. also need the module
  3453. <kbd><a href="http://www.cpan.org/modules/by-module/CGI/">CGI.pm</a></kbd>,
  3454. but this should have come with Perl anyway.
  3455.  
  3456. <p>
  3457. On Windows, you have to associate the <kbd>.pl</kbd> extension with the Perl
  3458. executable so that Perl scripts are executed by Perl.
  3459.  
  3460. <p>
  3461. <kbd>anlgform.pl</kbd> will understand the <kbd>GET</kbd> or <kbd>POST</kbd>
  3462. methods of form submission. The
  3463. <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.1">HTML
  3464. spec</a> says that <kbd>GET</kbd> should be used when, as in this case,
  3465. running the program has no side effects. However, section 15.1.3 of the
  3466. <a href="ftp://ftp.isi.edu/in-notes/rfc2616.txt">HTTP spec</a> says that
  3467. <kbd>POST</kbd> should be used if some of the options being passed might be
  3468. confidential. Also, very long URLs, formed by specifying lots of options, can
  3469. cause trouble to some older servers. So <kbd>anlgform.html</kbd> uses the
  3470. <kbd>POST</kbd> method by default. However, the <kbd>GET</kbd> method will
  3471. also work. For example, you could make a normal link to <kbd>anlgform.pl</kbd>
  3472. with options specified after a question mark in the usual <kbd>GET</kbd> way.
  3473.  
  3474. <hr>
  3475. <hr>
  3476. <a name="meaning"><h2>What the results mean</h2>
  3477. </a>
  3478. This section of the Readme is about understanding the results analog
  3479. produces. It's divided into three subsections.
  3480.  
  3481. <ul>
  3482.   <li><cite><a href="#webworks">How the web works</a></cite>. This section
  3483.       discusses what happens when somebody connects to your web site, and what
  3484.       you can and can't find out about them. If you think that you can get
  3485.       statistics on how many people have visited your web site (or want to
  3486.       know why you can't), then this section is for you.
  3487.   <li><cite><a href="#reports">Analog's reports</a></cite>. This section
  3488.       gives a summary of analog's reports, what they contain, and which
  3489.       commands influence each one.
  3490.   <li><cite><a href="#defns">Analog's definitions</a></cite>. This section
  3491.       gives precise details on all of analog's terminology, exactly what is
  3492.       counted in each report, and so on.
  3493. </ul>
  3494.  
  3495. <hr>
  3496. <hr>
  3497. <a name="webworks"><h2>How the web works</h2>
  3498. </a>
  3499. This section is about what happens when somebody connects to your web site, and
  3500. what statistics you can and can't calculate. There is a lot of confusion
  3501. about this. It's not helped by statistics programs which claim to calculate
  3502. things which cannot really be calculated, only estimated. The simple fact is
  3503. that certain data which we would like to know and which we expect to know are
  3504. simple not available. And the estimates used by other programs are not just a
  3505. bit off, but can be very, very wrong. For example (you'll see why below),
  3506. <em>if your home page has 10 graphics on, and an AOL user visits it, most
  3507. programs will count that as 11 different visitors!</em>
  3508. <p>
  3509. This section is fairly long, but it's worth reading carefully. If you
  3510. understand the basics of how the web works, you will understand what your web
  3511. statistics are really telling you.
  3512.  
  3513. <hr>
  3514. <b>1. The basic model.</b> Let's suppose I visit your web site. I follow a
  3515. link from somewhere else to your front page, read some pages, and then follow
  3516. one of your links out of your site.
  3517. <p>
  3518. So, what do you know about it? First, I make one request for your front
  3519. page. You know the date and time of the request and which page I asked for
  3520. (of course), and the internet address of my computer (my <i>host</i>). I also
  3521. usually tell you which page referred me to your site, and the make and model
  3522. of my browser. I do not tell you my username or my e-mail address.
  3523. <p>
  3524. Next, I look at the page (or rather my browser does) to see if it's got any
  3525. graphics on it. If so, and if I've got image loading turned on in my browser,
  3526. I make a separate connection to retrieve each of these graphics. I never log
  3527. into your site: I just make a sequence of requests, one for each new file I
  3528. want to download. The referring page for each of these graphics is your front
  3529. page. Maybe there are 10 graphics on your front page. Then so far I've made 11
  3530. requests to your server.
  3531. <p>
  3532. After that, I go and visit some of your other pages, making a new request for
  3533. each page and graphic that I want. Finally, I follow a link out of your site.
  3534. You never know about that at all. I just connect to the next site without
  3535. telling you.
  3536.  
  3537. <hr>
  3538. <b>2. Caches.</b> It's not always quite as simple as that. One major problem
  3539. is cacheing. There are two major types of cacheing. First, my browser
  3540. automatically caches files when I download them. This means that if I visit
  3541. them again, the next day say, I don't need to download the whole page
  3542. again. Depending on the settings on my browser, I might check with you that
  3543. the page hasn't changed: in that case, you do know about it, and analog will
  3544. count it as a new request for the page. But I might set my browser not to
  3545. check with you: then I will read the page again without you ever knowing about
  3546. it.
  3547. <p>
  3548. The other sort of cache is on a larger scale. I'm in the UK. Because the link
  3549. across the Atlantic is sometimes very congested, we've set up a national
  3550. cache. (Many individual ISP's also do the same thing.) I can set my browser to
  3551. get your pages from the national cache instead of directly from you. If anyone
  3552. else in the country has used the cache to look at your pages recently, the
  3553. cache will have saved them, and will give them out to me without ever telling
  3554. you about it. So hundreds of people could read your pages, even though you'd
  3555. only sent it out once. Also, if the page I wanted wasn't already stored in the
  3556. cache, the cache would ask for it from you on my behalf. This would mean that
  3557. the request appeared to come from the cache, rather than from me. If several
  3558. people did this, you would think that only one host was accessing the cache,
  3559. rather than lots of different ones.
  3560.  
  3561. <hr>
  3562. <b>3. What you can know.</b> The only things you can know for certain are the
  3563. number of requests made to your server, when they were made, which files were
  3564. asked for, and which host asked you for them.
  3565. <p>
  3566. You can also know what people told you their browsers were, and what the
  3567. referring pages were. You should be aware, though, that many browsers lie
  3568. deliberately about what sort of browser they are, or even let users configure
  3569. the browser name. Also, a few browsers send incorrect referrers, telling you
  3570. the last page that the user was on even if they weren't referred by that page.
  3571.  
  3572. <hr>
  3573. <b>4. What you can't know.</b>
  3574. <ol type=i>
  3575.   <li><i>You can't tell the identity of your readers</i>.
  3576.       Unless you explicitly require users to provide a password, you don't
  3577.       know who connected or what their e-mail addresses are.
  3578.   <li><i>You can't tell how many visitors you've had</i>.
  3579.       You can guess by looking at the number of distinct hosts that have
  3580.       requested things from you. But this is not always a good estimate for
  3581.       three reasons. First, if users get your pages from a local cache server,
  3582.       you will never know about it. Secondly, sometimes many users appear to
  3583.       connect from the same host: either users from the same company or ISP,
  3584.       or users using the same cache server. Finally, sometimes one user
  3585.       appears to connect from many different hosts. AOL now allocates users a
  3586.       <a href="http://webmaster.info.aol.com/network.html">different hostname
  3587.       for <i>every request</i></a>. So <em>if your home page has
  3588.       10 graphics on, and an AOL user visits it, most programs will count that
  3589.       as 11 different visitors!</em>
  3590.   <li><i>You can't tell how many visits you've had</i>.
  3591.       Many programs, under pressure from advertisers' organisations, define a
  3592.       "visit" (or "session") as a sequence of requests
  3593.       from the same host until there is a half-hour gap. This is an unsound
  3594.       method for several reasons. First, it assumes that each host corresponds
  3595.       to a separate person and vice versa. This is simply not true in the real
  3596.       world, as discussed in the last paragraph. Secondly, it assumes that
  3597.       there is never a half-hour gap in a genuine visit. This is also untrue.
  3598.       I quite often follow a link out of a site, then step back in my browser
  3599.       and continue with the first site from where I left off. Should it really
  3600.       matter whether I do this 29 or 31 minutes later? Finally, to make the
  3601.       computation tractable, such programs also need to assume that your
  3602.       logfile is in chronological order: it isn't always, and analog will
  3603.       produce the same results however you jumble the lines up.
  3604.   <li><i>Cookies don't solve these problems</i>.
  3605.       Some sites try to count their visitors by using cookies. But this can
  3606.       only work if you refuse to let people read your pages who can't or won't
  3607.       take a cookie. And you still have to assume that your visitors will use
  3608.       the same cookie for their next request.
  3609.   <li><i>You can't follow a person's path through your site</i>.
  3610.       Even if you assume that each person corresponds one-to-one to a host,
  3611.       you don't know their path through your site. It's very common for people
  3612.       to go back to pages they've downloaded before. You never know about
  3613.       these subsequent visits to that page, because their browser has cached
  3614.       them. So you can't track their path through your site accurately.
  3615.   <li><i>You often can't tell where they entered your site, or where they
  3616.       found out about you from</i>.
  3617.       If they are using a cache server, they will often be able to retrieve
  3618.       your home page from their cache, but not all of the subsequent pages
  3619.       they want to read. Then the first page you know about them requesting
  3620.       will be one in the middle of their true visit.
  3621.   <li><i>You can't tell how they left your site, or where they went next</i>.
  3622.       They never tell you about their connection to another site, so there's no
  3623.       way for you to know about it.
  3624.   <li><i>You can't tell how long people spent reading each page</i>.
  3625.       Once again, you can't tell
  3626.       which pages they are reading between successive requests for pages. They
  3627.       might be reading some pages they downloaded earlier. They might have
  3628.       followed a link out of your site, and they might or might not return
  3629.       later. They might have interrupted their reading for a quick game of
  3630.       Minesweeper. You just don't know.
  3631. </ol>
  3632. The bottom line is that HTTP is a stateless protocol. That means that people
  3633. don't log in and retrieve several documents: they make a separate connection
  3634. for each file they want. And <em>a lot of the time they don't even behave as
  3635. if they were logged into one site</em>. That's why analog reports requests,
  3636. i.e. what is going on at your server, which you know, rather than guessing
  3637. what the users are doing.
  3638. <p>
  3639. I've presented a somewhat negative view here, emphasising what you
  3640. can't find out. Web statistics are still informative: it's just important not
  3641. to slip from "this page has received 30,000 requests" to
  3642. "30,000 people have read this page."
  3643. In some sense these problems are not really new to the web -- they are present
  3644. just as much in print media too. For example, you only know how many magazines
  3645. you've sold, not how many people have read them. In print media we have learnt
  3646. to live with these issues, using the data which are available, and it would
  3647. be better if we did on the web too, rather than making up spurious numbers.
  3648.  
  3649. <hr>
  3650. <p>
  3651. <b>5. Acknowledgements and further reading.</b>
  3652. Many other people have made these points too. While originally writing
  3653. this section, I benefited from three earlier expositions:
  3654. <cite>Interpreting WWW Statistics</cite> by Doug Linder;
  3655. <cite>Making Sense of Web Usage Statistics</cite> by Dana Noonan;
  3656. and <cite>Getting Real about Usage Statistics</cite> by Tim Stehle.
  3657. Unfortunately none of these articles seems to be available on the web any more.
  3658. <p>
  3659. Another, extremely well-written document on these ideas is <cite>Measuring Web
  3660. Site Usage: Log File Analysis</cite> by Susan Haigh and Janette Megarity.
  3661. Being on a Canadian government site, it's available in both
  3662. <a href="http://www.nlc-bnc.ca/pubs/netnotes/notes57.htm">English</a> and
  3663. <a href="http://www.nlc-bnc.ca/pubs/netnotes/fnotes57.htm">French</a>.
  3664. Or for an even more negative point of you, you could read
  3665. <cite><a href="http://www.cranfield.ac.uk/stats/">Why Web Usage Statistics are
  3666. (Worse Than) Meaningless</a></cite> by Jeff Goldberg.
  3667.  
  3668.  
  3669.  
  3670. <hr>
  3671. <hr>
  3672. <a name="reports"><h2>Analog's reports</h2>
  3673. </a>
  3674. This section summarises all of analog's reports, and the main commands which
  3675. control them. For details on these commands, see the sections on
  3676. <cite><a href="#timereps">Time reports</a></cite>,
  3677. <cite><a href="#othreps">Other reports</a></cite> and
  3678. <cite><a href="#hierreps">Hierarchical reports</a></cite>.
  3679. For exact details on what is counted in each report, see the section on
  3680. <cite><a href="#defns">Analog's definitions</a></cite>.
  3681.  
  3682. <h3><a name="reptop">Top lines</a></h3>
  3683.  
  3684. <hr>
  3685. Program started at Thu-24-Sep-1998 13:48.
  3686. <br>Analysed requests from Wed-16-Sep-1998 09:52 to Mon-21-Sep-1998
  3687.   02:04 (4.7 days).
  3688. <hr>
  3689.  
  3690. The top two lines of the report tell you when the program was run, and
  3691. which dates it includes data from.
  3692.  
  3693. <h3><a name="repgen">General Summary</a></h3>
  3694.  
  3695. <hr>
  3696. (Figures in parentheses refer to the 7 days to 24-Sep-1998 13:48).
  3697. <br><b>Successful requests:</b> 79,646 (48,947)
  3698. <br><b>Average successful requests per day:</b> 17,036 (6,992)
  3699. <br><b>Successful requests for pages:</b> 31,138 (18,689)
  3700. <br><b>Average successful requests for pages per day:</b> 6,660 (2,669)
  3701. <br><b>Failed requests:</b> 9,008 (6,378)
  3702. <br><b>Redirected requests:</b> 344 (235)
  3703. <br><b>Distinct files requested:</b> 8,180 (2,884)
  3704. <br><b>Distinct hosts served:</b> 6,640 (4,991)
  3705. <br><b>Corrupt logfile lines:</b> 2
  3706. <br><b>Data transferred:</b> 976.92 Mbytes (627.06 Mbytes)
  3707. <br><b>Average data transferred per day:</b> 208.96 Mbytes (89.58 Mbytes)
  3708. <hr>
  3709.  
  3710. The General Summary contains some overall statistics about the data being
  3711. analysed: the most important being the number of <b>requests</b> (the total
  3712. number of files downloaded, including graphics); the number of <b>requests for
  3713. pages</b> (just counting the various pages on your site); the number of
  3714. <b>distinct hosts</b> (the number of different computers requests have come
  3715. from); and the amount of <b>data transferred</b> in bytes. For exactly what
  3716. the various lines mean, see the section on <cite><a href="#defns">Analog's
  3717. definitions</a></cite>.
  3718. <p>
  3719. The figures in parentheses represent the seven days given at the top of this
  3720. report: it's the seven days before the <kbd>TO</kbd> time if there was a
  3721. <kbd>TO</kbd> command, or if not the seven days before the report was run.
  3722. <p>
  3723. You can't find out the number of visitors or visits you've had, and don't
  3724. believe any program which tells you that you can. See the section on
  3725. <cite><a href="#webworks">How the web works</a></cite> for a discussion of
  3726. this.
  3727. <p>
  3728. You can turn this report on or off with the
  3729. <kbd><a href="#replist">GENERAL</a></kbd> command. You can include
  3730. or exclude the figures for the last seven days with the
  3731. <kbd><a href="#LASTSEVEN">LASTSEVEN</a></kbd> command.
  3732. You may get slightly different lines to those above, depending on other
  3733. options you have set.
  3734.  
  3735. <h3><a name="reptime">Monthly, Weekly, Daily, Hourly, Quarter-Hour and
  3736. Five-Minute Reports</a></h3>
  3737.  
  3738. <hr>
  3739. Each unit (<img src="barb1.gif" alt="+">) represents 800 requests for pages, or part thereof.
  3740. <pre><tt>week beg.: #reqs: pages: 
  3741. ---------: -----: -----: 
  3742. 13/Sep/98: 69614: 25277: <img src="barb32.gif" alt="++++++++++++++++++++++++++++++++">
  3743. 20/Sep/98: 10032:  5861: <img src="barb8.gif" alt="++++++++">
  3744. </tt></pre>
  3745. Busiest week: week beginning 13/Sep/98 (26,654 requests for pages).
  3746. <hr>
  3747.  
  3748. These reports tell you how many requests there were in each time
  3749. period. They also tell you which was the busiest time period.
  3750.  
  3751. <p>You can control whether each report is included or not with the appropriate
  3752. <a href="#replist"><kbd>ON</kbd> or <kbd>OFF</kbd></a> command.
  3753. You can control which columns are listed by the
  3754. <kbd><a href="#timeCOLS">COLS</a></kbd> commands. You can control
  3755. which measurement to use for the bar charts and the "busiest" line
  3756. by the <kbd><a href="#GRAPH">GRAPH</a></kbd> commands. You can
  3757. determine how many rows are displayed with the
  3758. <kbd><a href="#ROWS">ROWS</a></kbd> commands. You can display the
  3759. lines backwards or forwards in time by the
  3760. <kbd><a href="#BACK">BACK</a></kbd> commands. You can change the
  3761. graphic used for the bar charts with the
  3762. <kbd><a href="#BARSTYLE">BARSTYLE</a></kbd> command.
  3763.  
  3764. <h3><a name="reptimesum">Daily and Hourly Summaries</a></h3>
  3765.  
  3766. <hr>
  3767. Each unit (<img src="barb1.gif" alt="+">) represents 150 requests for pages, or part thereof.
  3768. <pre><tt>day: #reqs: pages: 
  3769. ---: -----: -----: 
  3770. Sun:  2031:  1193: <img src="barb8.gif" alt="++++++++">
  3771. Mon:  8001:  4668: <img src="barb32.gif" alt="++++++++++++++++++++++++++++++++">
  3772. Tue:     0:     0: 
  3773. Wed: 13934:  5915: <img src="barb32.gif" alt="++++++++++++++++++++++++++++++++++++++++"><img src="barb8.gif" alt="">
  3774. [etc.]
  3775. </tt></pre>
  3776. <hr>
  3777.  
  3778. These reports tell you the total number of requests in each day of the week,
  3779. or each hour of the day, over the time period given at the very top of the
  3780. report. (It's not the average, nor is it the figures for just the last week or
  3781. last day).
  3782.  
  3783. <p>You can control whether each report is included or not with the appropriate
  3784. <a href="#replist"><kbd>ON</kbd> or <kbd>OFF</kbd></a> command.
  3785. You can control which columns are listed by the
  3786. <kbd><a href="#timeCOLS">COLS</a></kbd> commands. You can control
  3787. which measurement to use for the bar charts by the
  3788. <kbd><a href="#GRAPH">GRAPH</a></kbd> commands. You can change the
  3789. graphic used for the bar charts with the
  3790. <kbd><a href="#BARSTYLE">BARSTYLE</a></kbd> command.
  3791.  
  3792.  
  3793. <h3><a name="repoth">Other reports</a></h3>
  3794.  
  3795. <hr>
  3796. Listing the first 5 files by the number of requests, sorted by 
  3797.   the number of requests.
  3798. <pre><tt>#reqs: %bytes:       last date: file
  3799. -----: ------: ---------------: ----
  3800.  4123:  2.29%: 21/Sep/98 01:57: /~sret1/analog/
  3801.  3064:  0.15%: 21/Sep/98 01:54: /~sret1/analog/analogo.gif
  3802.  1737:  0.01%: 21/Sep/98 01:53: /~sret1/images/bar1.gif
  3803.  1692:  0.01%: 21/Sep/98 01:53: /~sret1/images/bar16.gif
  3804.  1685:  0.01%: 21/Sep/98 01:53: /~sret1/images/bar8.gif
  3805. 67345: 97.54%: 21/Sep/98 02:04: [not listed: 8,175 files]
  3806. </tt></pre>
  3807. <hr>
  3808.  
  3809. The rest of the reports are all quite similar. Here is a list of them. If
  3810. you're unfamiliar with some of the terms, see the section on
  3811. <cite><a href="#defns">Analog's definitions</a></cite>.
  3812. <ul>
  3813. <li>The Host Report lists all <b>computers</b> which downloaded files from you.
  3814. <li>The Domain Report lists which <b>countries</b> those computers came
  3815.     from. (If you only get "unresolved numerical addresses", see the
  3816.     <a href="#underfaq">FAQ</a>.)
  3817. <li>The Organisation Report <a href="#domfile">attempts</a> to list the
  3818.     <b>organisations</b> (companies, institutions, ISPs etc.) which the
  3819.     computer was registered under.
  3820. <li>The Request Report (the example above) lists which <b>files</b> were
  3821.     downloaded.
  3822. <li>The Directory Report lists which <b>directories</b> those files came from.
  3823. <li>The File Type Report lists the <b>file types</b> (actually, extensions) of
  3824.     those files.
  3825. <li>The File Size Report breaks them down by <b>size</b>.
  3826. <li>The Processing Time Report shows the <b>time taken</b> to serve each file.
  3827. <li>The Redirection Report lists the filenames which resulted in redirections:
  3828.     mainly directories without the final slash, and
  3829.     "<b>click-thru</b>"'s.
  3830. <li>The Failure Report lists the filenames which caused errors.
  3831. <li>The Referrer Report lists which pages <b>linked</b> to your files.
  3832. <li>The Referring Site Report lists the servers those referrers were on.
  3833. <li>The Search Query Report and the Search Word Report lists which <b>search
  3834.     terms</b> people used to find your site (provided you've used the
  3835.     appropriate <kbd><a href="#SEARCHENGINE">SEARCHENGINE</a></kbd>
  3836.     commands).
  3837. <li>The Redirected Referrer Report lists the referrers which led to
  3838.     redirections.
  3839. <li>The Failed Referrer Report is essentially a <b>broken link</b> report.
  3840. <li>The Browser Report lists the detailed versions of <b>browsers</b> used,
  3841.     and the Browser Summary collects them by vendor.
  3842. <li>The Operating System Report lists the <b>operating systems</b> of the
  3843.     visitors whose browser types you know.
  3844. <li>The <b>Virtual Host</b> Report and the <b>User</b> Report are obvious.
  3845. <li>The Failed User Report lists the users who caused errors.
  3846. <li>The Status Code Report lists the number of each
  3847.     <b>HTTP status code</b> that you had.
  3848. </ul>
  3849. Whether you can get all of these reports depends on what information is
  3850. recorded in your logfile.
  3851.  
  3852. <p>As usual, you can control whether each report is included or not with the
  3853. appropriate <a href="#replist"><kbd>ON</kbd> or <kbd>OFF</kbd></a>
  3854. command. You can control which columns are listed by the
  3855. <kbd><a href="#othCOLS">COLS</a></kbd> commands. You can change
  3856. how the reports are sorted by the
  3857. <kbd><a href="#SORTBY">SORTBY</a></kbd> commands. You can control
  3858. how many items are listed by the
  3859. <kbd><a href="#FLOOR">FLOOR</a></kbd> commands. You can include or
  3860. exclude individual items with the <a href="#outputexcludes">output
  3861. <kbd>INCLUDE</kbd> and <kbd>EXCLUDE</kbd></a> commands. You can change the
  3862. names of items in the reports with the
  3863. <a href="#OUTPUTALIAS"><kbd>OUTPUTALIAS</kbd></a> commands.
  3864.  
  3865. <p>The "not listed" line at the bottom counts those items which
  3866. didn't get enough traffic to get above the <kbd>FLOOR</kbd> for the report,
  3867. and those which were explicitly <kbd>EXCLUDE</kbd>d.
  3868.  
  3869. <p>Most of these reports have a hierarchical structure, like this example for
  3870. the Domain Report:
  3871. <hr>
  3872. Listing the first 5 domains by the number of requests, sorted by 
  3873.   the number of requests.
  3874. <pre><tt>no.: #reqs: %bytes: domain
  3875. ---: -----: ------: ------
  3876.   1: 13243: 16.23%: .com (Commercial)
  3877.    :  1262:  1.26%:   aol.com
  3878.   2: 11783: 25.64%: .jp (Japan)
  3879.    :  9592: 22.19%:   ad.jp
  3880.    :  1043:  1.97%:   co.jp
  3881.   3: 10073: 11.62%: .net (Network)
  3882.    :  1926:  1.71%:   uu.net
  3883.   4:  9657: 13.31%: [unresolved numerical addresses]
  3884.   5:  7388:  8.04%: .uk (United Kingdom)
  3885.    :  5792:  5.74%:   ac.uk
  3886.    :  1510:  1.99%:   co.uk
  3887.    : 18502: 25.16%: [not listed: 82 domains]
  3888. </tt></pre>
  3889. <hr>
  3890. You can control which items are listed on the lower levels by the
  3891. <a href="#hierreps"><kbd>SUB</kbd></a> family of commands.
  3892. There are also separate
  3893. <a href="#SUBSORTBY">sub-<kbd>SORTBY</kbd></a> and
  3894. <a href="#SUBFLOOR">sub-<kbd>FLOOR</kbd></a> commands for the
  3895. lower levels. (Called
  3896. <a href="#ARGSSORTBY"><kbd>ARGSSORTBY</kbd></a> and
  3897. <a href="#ARGSFLOOR"><kbd>ARGSFLOOR</kbd></a> for some reports,
  3898. such as the Request Report.)
  3899. Notice that the lower levels are always listed with their parents, so they
  3900. break up the sort order. Also, they don't count towards the total number of
  3901. items listed, so there are only 5 domains listed in the example above, as you
  3902. can see in the first column. (The <a href="#othCOLS"><kbd>N</kbd>
  3903. column</a> is particularly useful in hierarchical reports for this reason.)
  3904.  
  3905. <p>
  3906. Which files are linked to in the Request Report is controlled by the
  3907. <a href="#LINKINCLUDE"><kbd>LINKINCLUDE</kbd> and
  3908. <kbd>LINKEXCLUDE</kbd></a> commands, and which files are linked to in the
  3909. various referrer reports is controlled by the
  3910. <a href="#LINKINCLUDE "><kbd>REFLINKINCLUDE</kbd> and
  3911. <kbd>REFLINKEXCLUDE</kbd></a> commands. The links in the Request Report are
  3912. also affected by the <kbd><a href="#BASEURL">BASEURL</a></kbd>
  3913. command.
  3914.  
  3915. <h3><a name="repbot">Bottom lines</a></h3>
  3916.  
  3917. <hr>
  3918. <i>This analysis was produced by <a HREF="http://www.statslab.cam.ac.uk/~sret1/analog/">analog4.03/Unix</a>.
  3919. <br><b>Running time:</b> 8 seconds.</i>
  3920. <hr>
  3921.  
  3922. At the end of the report you can see which version of analog produced the
  3923. report, and how long the report took to run.
  3924.  
  3925. <hr>
  3926. <hr>
  3927. <a name="defns"><h2>Analog's definitions</h2>
  3928. </a>
  3929. This section describes how analog defines its terms, and exactly what is
  3930. counted in each category. It gets a bit technical at times -- if you're just
  3931. trying to understand the reports, I recommend you read the section on
  3932. <cite><a href="#reports">Analog's reports</a></cite> first.
  3933.  
  3934. <p>
  3935. We start with some basic definitions.
  3936. The <i>host</i> is the computer which has asked you for a file. The file
  3937. might be a <i>page</i> (i.e., an HTML document) or it might be something
  3938. else, such as an image. By default filenames ending in <kbd>.html</kbd>,
  3939. <kbd>.htm</kbd> or <kbd>/</kbd> count as pages but you can tell analog to
  3940. count any file as a page with the
  3941. <kbd><a href="#PAGEINCLUDE">PAGEINCLUDE</a></kbd> command.
  3942. <p>
  3943. The <i>total requests</i> counts all the files which
  3944. have been requested, including pages, graphics, etc. (Some people call this
  3945. the number of hits, but that word is also used in other ways by other
  3946. people, so I avoid it). The <i>requests for pages</i> obviously only counts
  3947. pages. The <i>referrer</i> for a request
  3948. is the place that the user (or his computer) heard about your file from. If
  3949. he followed a link to reach a page, it will be the previous page. In the
  3950. case of a graphic on a page, the referrer will be the page containing the
  3951. graphic.
  3952. <hr>
  3953. Analog recognises four categories of request, based on the HTTP status code of
  3954. the request. You can see the total number of requests for each status code,
  3955. and what the codes mean, in the Status Code Report. (Or see the
  3956. <a href="http://www.w3.org/Protocols/rfc2068/rfc2068">HTTP spec</a> for a
  3957. detailed description.)
  3958. <p>
  3959. First, <i>successful requests</i> are those with HTTP status codes in the 200's
  3960. (where the document was returned) or with code 304 (where the document was
  3961. requested but was not needed because it had not been recently modified and the
  3962. user could use a cached copy). Sometimes the logfile line doesn't contain a
  3963. status code. These lines are also assumed by analog to be successes.
  3964. <p>
  3965. <i>Redirected requests</i> are those with other codes in the 300's, indicating
  3966. that the user was directed to a different file instead. The most common cause
  3967. of these requests is that the user has incorrectly requested a directory name
  3968. without the trailing slash. The server replies with a redirection ("you
  3969. probably mean the following") and the user then makes a second connection
  3970. to get the correct document (although usually the browser does it automatically
  3971. without the user's intervention or knowledge). The other common cause of
  3972. redirected requests is their use as "click-thru" advertising
  3973. banners.
  3974. <p>
  3975. <i>Failed requests</i> are those with codes in the 400's (error in request) or
  3976. 500's (server error). They come about for a variety of reasons, but the most
  3977. common are when the requested file is not found or is read-protected.
  3978. <p>
  3979. Finally, <i>requests returning informational status code</i> are those with
  3980. status codes in the 100's. These are very rare at the moment.
  3981. <p>
  3982. There are a few other types of logfile lines listed in the General Summary.
  3983. <i>Lines without status code</i> refers to those logfile lines without a
  3984. status code, and the successful requests in the General Summary only counts
  3985. the ones with a status code: except if the line contains the name of the file
  3986. requested, and the filename is being counted (not starred in the
  3987. <kbd><a href="#starredfmt">LOGFORMAT</a></kbd>), then it's listed in
  3988. the successes.
  3989. <i>Corrupt logfile lines</i> are those which analog didn't manage to parse. And
  3990. <i>unwanted logfile entries</i> are ones which we have specifically
  3991. <a href="#include">excluded</a>. Successful requests for pages refers to
  3992. those lines on which the file requested was named and was a page.
  3993. <hr>
  3994. Most reports only include successful requests in calculating the number of
  3995. requests, requests for pages, bytes, and last date: unless, of course, the
  3996. report is a redirection or failure report. There is a further restriction on
  3997. the time reports, the Status Code Report, the Processing Time Report and the
  3998. File Size Report: the logfile
  3999. line must also contain the name of the file requested, and the filename must
  4000. be being counted. This is necessary to stop double counting if the server uses
  4001. separate logs.
  4002. <p>
  4003. The "not listed" line at the bottom of each of the
  4004. <a href="#othreps">non-time reports</a> includes both those items which
  4005. were explicitly excluded at the output stage with an
  4006. <kbd><a href="#outputexcludes">OUTPUTEXCLUDE</a></kbd> command,
  4007. and those which were not listed because they were below the floor for the
  4008. report.
  4009. <p>
  4010. The figures in parentheses in the General Summary are for the last seven days:
  4011. either the seven days before the <kbd>TO</kbd> time, or if no <kbd>TO</kbd>
  4012. time is given, the seven days before the time of the program start. (It would
  4013. be nicer to use the seven days before the last time in the logfile, but we
  4014. don't know when this is until we've read the whole logfile, and by then it's
  4015. too late.) The figures for the last seven days are not included if all, or
  4016. none, of the requests fall in the last seven days.
  4017. <p>
  4018. In the Domain Report, "domain not given" means that the hostname did
  4019. not contain a dot. "Unknown domain" means that it did contain a dot,
  4020. but that the domain name was not in the <a href="#domfile">domains
  4021. file</a>. The hosts and domains concerned can be listed by turning
  4022. <a href="#debugs">debugging</a> on.
  4023. <hr>
  4024. <hr>
  4025. <a name="errors"><h2>Errors and warnings</h2>
  4026. </a>
  4027. This section lists all the errors and warnings which analog can produce,
  4028. together with a short explanation.
  4029.  
  4030. <p>
  4031. First, you should understand the difference between a crash, an error, a
  4032. warning, and a debugging message. First, a <i>crash</i> is when analog exits
  4033. prematurely, without producing the whole output file. The system might give a
  4034. message, but analog will not give one of its own messages. Analog should never
  4035. crash. If it does crash, please <a href="#mailing">tell me about it</a>.
  4036.  
  4037. <p>
  4038. An <i>error</i> is something which stops analog finishing its job. Whenever
  4039. an error is detected, analog gives a message starting something like
  4040. <kbd>analog: Fatal error:</kbd> and will then tell you what type of thing went
  4041. wrong before quitting.
  4042.  
  4043. <p>
  4044. A <i>warning</i> is a problem which is not fatal to analog: it will keep on
  4045. with its processing. These vary from the possibly serious, such as files which
  4046. could not be found, to purely informational. They produce a message starting
  4047. <kbd>analog: Warning</kbd>. You can turn warnings off using the
  4048. <kbd><a href="#WARNINGS">WARNINGS</a></kbd> command.
  4049.  
  4050. <p>
  4051. Finally, a <i>debugging message</i> gives information on the state of the
  4052. program. They just begin with a single code letter followed by a colon. You
  4053. don't get any debugging messages unless you've
  4054. <a href="#debugs">asked for them</a>.
  4055.  
  4056. <p>
  4057. If you want to send these messages to a file instead of to the screen, you can
  4058. use the <kbd><a href="#ERRFILE">ERRFILE</a></kbd> command.
  4059. To tell analog the width of your screen for these messages, you can use the
  4060. <kbd><a href="#ERRLINELENGTH">ERRLINELENGTH</a></kbd> command.
  4061.  
  4062. <p>
  4063. Now I shall describe all the possible <a href="#errs">errors</a> and
  4064. <a href="#warns">warnings</a> in detail.
  4065. <hr>
  4066. <h3><a name="errs">Errors</a></h3>
  4067. <dl>
  4068.   <dt><b>Ran out of memory: cannot continue</b>
  4069.   <dd>Analog ran out of memory. Try increasing the memory available to the
  4070.       process, if your operating system will allow it, or using the
  4071.       <kbd><a href="#lowmem">LOWMEM</a></kbd> commands.
  4072.   <dt><b>Cannot ignore mandatory configuration file</b>
  4073.   <dd>See the section in the Readme on the
  4074.       <a href="#specialcfgs">mandatory configuration file</a>.
  4075.   <dt><b>Can't find language file
  4076.       <br>Language file too short
  4077.       <br>Language file contains excessively long lines</b>
  4078.   <dd>Analog can't run without a well-formed language file. See the
  4079.       documentation on <a href="#LANGUAGE">language files</a>.
  4080.   <dt><b>Attempted to read more than 50 configuration files</b>
  4081.   <dd>The most likely explanation for this is that you have accidentally
  4082.       created a loop using the
  4083.       <kbd><a href="#CONFIGFILE">CONFIGFILE</a></kbd> command, for
  4084.       example if a configuration file includes itself.
  4085.   <dt><b>Incorrect default given in <kbd>anlghead.h</kbd>
  4086.       <br>Default given in <kbd>anlghead.h</kbd> too short</b>
  4087.   <dd>If you've compiled your own version, and you've specified an incorrect
  4088.       configuration in the file <kbd>anlghead.h</kbd>, analog gives up to
  4089.       allow you to fix it.
  4090.   <dt><b>Failed to open output file for writing</b>
  4091.   <dd>Analog couldn't create, or couldn't write to, the output file you
  4092.       specified.
  4093.   <dt><b>Cache output file already exists: won't overwrite</b>
  4094.   <dd>Analog won't overwrite an old cache file. You must move or delete it
  4095.       yourself first.
  4096.   <dt><b><kbd>OUTFILE</kbd> and <kbd>CACHEOUTFILE</kbd> are the same</b>
  4097.   <dt><b><kbd>OUTFILE</kbd> and <kbd>CACHEOUTFILE</kbd> both set to stdout</b>
  4098.   <dd>This can't be what you wanted, because one would overwrite the other.
  4099.   <dt><b><kbd>OUTPUT NONE</kbd> and <kbd>CACHEOUTFILE none</kbd> selected</b>
  4100.   <dd>You requested no output.
  4101. </dl>
  4102. <hr>
  4103. <h3><a name="warns">Warnings</a></h3>
  4104. Remember that warnings are not fatal: in fact some are rarely even serious.
  4105. You can turn them off using the
  4106. <kbd><a href="#WARNINGS">WARNINGS</a></kbd> command. The possible
  4107. warnings come in several different categories, shown by a letter in the warning
  4108. message. The categories are as follows.
  4109. <dl compact>
  4110.   <dt><kbd>C</kbd><dd>invalid configuration specified
  4111.   <dt><kbd>D</kbd><dd>dubious configuration specified
  4112.   <dt><kbd>E</kbd><dd><kbd>ERRFILE</kbd> command used
  4113.   <dt><kbd>F</kbd><dd>files missing or corrupt
  4114.   <dt><kbd>L</kbd><dd>apparent problems in logfiles
  4115.   <dt><kbd>M</kbd><dd>possibly problems in logfiles
  4116.   <dt><kbd>R</kbd><dd>turning off empty reports
  4117. </dl>
  4118. <p>
  4119. <h4><a name="warnsC">Category C</a></h4>
  4120. This category indicates an incorrect configuration. Analog will either ignore
  4121. what you said, or try and do the best it can with it. There are too many
  4122. warnings in this category to list completely. You will have to consult the
  4123. documentation for the particular <a href="#custom">configuration
  4124. command</a> that gave an error. If you get an error for a command which used
  4125. to work in a previous version of analog, have a look in the section
  4126. <cite><a href="#update">Updating from older versions</a></cite>.
  4127. <p>
  4128. <h4><a name="warnsD">Category D</a></h4>
  4129. This is for configurations which might be intended, but which look suspicious.
  4130. Analog will not override what you've specified in this case.
  4131. <dl>
  4132.   <dt><b><kbd>LOGFORMAT</kbd> with no subsequent logfile</b>
  4133.   <dd>You have specified a <kbd>LOGFORMAT</kbd> command, but no
  4134.       subsequent logfile to which it could be applied. Most likely
  4135.       you put the <kbd>LOGFORMAT</kbd> after the <kbd>LOGFILE</kbd> command.
  4136.       You must put the <kbd>LOGFORMAT</kbd> before the <kbd>LOGFILE</kbd>
  4137.       command or use <kbd>DEFAULTLOGFORMAT</kbd> instead. See the section on
  4138.       <cite><a href="#logfmt">Specifying a log format</a></cite> for
  4139.       more details.
  4140.   <dt><b>Offset not a multiple of 30
  4141.       <br>Offset more than 25 hours</b>
  4142.   <dd>The <a href="#TIMEOFFSET">time offsets</a> are meant to be for
  4143.       correcting between differences in time zones. These differences are
  4144.       usually multiples of 30 minutes between -25 and +25 hours. Maybe you
  4145.       specified the offset in hours instead of minutes by mistake, or
  4146.       something like that.
  4147.   <dt><b><kbd>FROM</kbd> time is later than the present</b>
  4148.   <dd>Usually this will mean that no entries are counted. Analog doesn't
  4149.       try and correct it in case the clock on your computer or your server is
  4150.       wrong -- but you would be better using
  4151.       <kbd><a href="#TIMEOFFSET">TIMEOFFSET</a></kbd> or
  4152.       <kbd><a href="#TIMEOFFSET">LOGTIMEOFFSET</a></kbd> to correct
  4153.       those clocks.
  4154.   <dt><b><kbd>SORTBY</kbd> doesn't match <kbd>FLOOR</kbd>
  4155.       <br><kbd>SORTBY</kbd> doesn't match <kbd>SUBSORTBY</kbd>
  4156.       (or <kbd>FLOOR</kbd>/<kbd>SUBFLOOR</kbd>)
  4157.       <br><kbd>SORTBY</kbd> (or <kbd>FLOOR</kbd> or <kbd>GRAPH</kbd>) isn't
  4158.       included in <kbd>COLS</kbd></b>
  4159.   <dd>Within one report, it's helpful to your readers to have the sort methods
  4160.       and the floors compatible, and all included in the <kbd>COLS</kbd>.
  4161.       (See the section on <cite><a href="#othreps">Non-time
  4162.       reports</a></cite>).
  4163.   <dt><b>Column <kbd>N</kbd> with <kbd>SORTBY ALPHABETICAL/RANDOM</kbd></b>
  4164.   <dd>Numbering off the items when they're not in order of busyness is
  4165.       probably a mistake.
  4166.   <dt><b>Time reports have not all got same value of <kbd>BACK</kbd></b>
  4167.   <dd>It's usually helpful to have all the <a href="#BACK">time
  4168.       reports</a> running in the same direction.
  4169.   <dt><b>Report contains no <kbd>COLS</kbd></b>
  4170.   <dd>You've got an empty <kbd>COLS</kbd> list for one report, so you'll just
  4171.       get a list of names, not any information about them.
  4172.   <dt><b><kbd>LOWMEM 3</kbd> prevents that item being cached</b>
  4173.   <dd>You're making a <a href="#cache">cache file</a>, but one item is
  4174.       not being recorded because of a
  4175.       <kbd><a href="#lowmem">LOWMEM</a></kbd> command, and will therefore
  4176.       not be saved in the cache file.
  4177. </dl>
  4178. <p>
  4179. <h4><a name="warnsE">Category E</a></h4>
  4180. There is only one warning in this category.
  4181. <dl>
  4182.   <dt><b>Redirecting future diagnostic messages</b>
  4183.   <dd>You've used an <kbd>ERRFILE</kbd> command to change the destination of
  4184.       errors, warnings, debugging and <kbd>PROGRESSFREQ</kbd>
  4185.       diagnostics. This is just warning you so that you don't miss any
  4186.       messages.
  4187. </dl>
  4188. <p>
  4189. <h4><a name="warnsF">Category F</a></h4>
  4190. This category is for diagnosing files which couldn't be opened or read
  4191. successfully. These can be serious, but most of the messages should be
  4192. self-explanatory. There are two worth mentioning specifically.
  4193. <dl>
  4194. <dt><b>Can't auto-detect format of logfile</b>
  4195. <dd>The <kbd><a href="#logfmt">LOGFORMAT</a></kbd> is set to automatic
  4196.     detection, but the first line of the logfile is not in any of the
  4197.     standard formats. This error can often be generated when you try and
  4198.     specify your own <kbd>LOGFORMAT</kbd> but put it after the
  4199.     <kbd>LOGFILE</kbd> command so that it is not in effect for that logfile.
  4200. <dt><b>Logfile with ambiguous dates</b>
  4201. <dd>Some servers, notably IIS and WebSite, record dates in their logfiles
  4202.     according to local conventions. Then if analog encounters 2/1/99, for
  4203.     example, it doesn't know whether it's the 2nd January or 1st February.
  4204.     This problem, and what to do about it, is described in more detail in the
  4205.     section on
  4206.     <cite><a href="#IISfmt">Choosing a logfile</a></cite>.
  4207. <dt><b>DNS lock file already exists</b>
  4208. <dd>To stop two copies of analog trying to write the DNS file at the same
  4209.     time, an empty "lock file" is created, which tells the second
  4210.     copy of analog to use <kbd>DNS LOOKUP</kbd> instead of <kbd>DNS
  4211.     WRITE</kbd>. If analog crashes, it may not delete its lock file. So if you
  4212.     get the "already exists" message even though no other copy of
  4213.     analog is running, you may need to delete the lock file yourself.
  4214. </dl>
  4215. <p>
  4216. <h4><a name="warnsL">Category L</a></h4>
  4217. When analog finishes reading a logfile, it checks whether there might have
  4218. been something wrong with it.
  4219. <dl>
  4220.   <dt><b>Large number of corrupt lines</b>
  4221.   <dd>This could indicate a problem with the logfile, or with the
  4222.       <kbd><a href="#logfmt">LOGFORMAT</a></kbd> specification.
  4223.       The possible causes are described in the section about
  4224.       <cite><a href="#corruptlines">Choosing a logfile</a></cite>.
  4225.   <dt><b>Logfiles overlap: possible double counting</b>
  4226.   <dd>Two logfiles which were counting the same type of item overlapped in
  4227.       time. Maybe you read two copies of the same logfile. Or maybe the
  4228.       <kbd><a href="#starredfmt">LOGFORMAT</a></kbd> specification
  4229.       should
  4230.       have told analog to ignore some of the items. Or it could be that the
  4231.       logfiles are in fact disjoint and there wasn't really a problem: analog
  4232.       only checks the dates of the logfiles, not the details of them. In this
  4233.       last case, the statistics produced will still be correct.
  4234. </dl>
  4235. <p>
  4236. <h4><a name="warnsM">Category M</a></h4>
  4237. This category is for warnings about logfile formats which might make analog
  4238. produce unexpected results.
  4239. <dl>
  4240.   <dt><b>Logfile contains lines with no [whatevers], which are being
  4241.       filtered</b>
  4242.   <dd>This is usually harmless. It is perhaps best explained by
  4243.       example. Suppose you are <a href="#include">excluding</a> certain
  4244.       files from the analysis, but that you are also analysing a browser log
  4245.       which just contains information about the browsers used, not which files
  4246.       they read. Then we can't exclude the browsers which read the excluded
  4247.       files, because we don't know which they were, so all browsers will be
  4248.       included.
  4249.   <dt><b>Logfile contains lines with no file names (or bytes): page (or byte)
  4250.       counts may be low</b>
  4251.   <dd>If a logfile line doesn't contain a file name, analog will assume that
  4252.       the request wasn't for a page. Similarly, if it doesn't give the number
  4253.       of bytes transferred, analog will make the bytes zero. So the number of
  4254.       page requests or bytes credited to the other items on that line will
  4255.       then be too low.
  4256. </dl>
  4257. <p>
  4258. <h4><a name="warnsR">Category R</a></h4>
  4259. This is used when analog turns off an empty report. This could be because none
  4260. of the relevant items were included in any of the logfiles, or perhaps
  4261. beacause a <kbd><a href="#lowmem">LOWMEM</a></kbd> command stopped them
  4262. being recorded.
  4263. <p>
  4264. <h4><a name="brokenpipe">Broken Pipe</a></h4>
  4265. This is not an analog-generated warning, but it can result from analog closing
  4266. a logfile it's uncompressing without reading the whole of it, when it
  4267. determines that it will not need it.
  4268. <hr>
  4269. <hr>
  4270. <a name="faq"><h2>Frequently asked questions</h2>
  4271. </a>
  4272. This list is divided into six sections:
  4273. <ol type="A">
  4274.   <li><a href="#startfaq">Getting Started</a>
  4275.   <li><a href="#configfaq">Basic Configuration</a>
  4276.   <li><a href="#underfaq">Understanding the Output</a>
  4277.   <li><a href="#advfaq">Advanced Usage</a>
  4278.   <li><a href="#formfaq">Form Interface</a>
  4279.   <li><a href="#designfaq">Design Decisions</a>
  4280. </ol>
  4281.  
  4282. <h3><a name="startfaq">A. Getting Started</a></h3>
  4283. Most questions in this category are answered in the section entitled
  4284. <cite><a href="#start">Starting to use analog</a></cite>. If you can't get
  4285. analog running you should look there.
  4286. <ol>
  4287.   <li><b>Analog doesn't have a <kbd>setup.exe</kbd>.</b>
  4288.       <br>No, and it doesn't need one. It's already ready to run! See
  4289.       <cite><a href="#startpc">Starting to use analog under
  4290.       Windows</a></cite>.
  4291.   <li><b>Analog just flashes up a DOS window and then quits.</b>
  4292.       <br>This is the correct behaviour. It should have created a report
  4293.       called <kbd>Report.html</kbd>. See <cite><a href="#startpc">Starting
  4294.       to use analog under Windows</a></cite>.
  4295.   <li><b>When I try and compile analog, it gives me an error (e.g. on
  4296.       SunOS 5).</b>
  4297.       <br>Maybe you need to edit the Makefile. There are some
  4298.       platform-specific notes in the section
  4299.       <cite><a href="#startux">Starting to use analog on other
  4300.       platforms</a></cite>, and in the Makefile itself.
  4301.   <li><b>Analog didn't write the logfile when I ran it.</b>
  4302.       <br>Analog doesn't write the logfiles. Your web server writes the
  4303.       logfiles, and analog just reads them. See
  4304.       <cite><a href="#start">Starting to use analog</a></cite>.
  4305.   <li><b>Analog is looking for files like
  4306.       <kbd>/usr/local/etc/httpd/analog/analog.cfg</kbd> which don't exist.</b>
  4307.       <br>You have to set the location of these files in <kbd>anlghead.h</kbd>
  4308.       before compiling.
  4309.   <li><b>Analog won't read extended logfiles generated by IIS.</b>
  4310.       <br>This server writes the date only at the top of the logfile, not on
  4311.       every line. But it doesn't write a new date if the date changes during
  4312.       the logfile, so analog can't tell which date later entries in the log
  4313.       occurred on. More details, and what to do about it, are in the section on
  4314.       <cite><a href="#dateonly">Choosing a logfile</a></cite>.
  4315.   <li><b>What does "Logfile with ambiguous dates" mean?</b>
  4316.       <br>See the section on <cite><a href="#warnsF">Errors and
  4317.       warnings</a></cite>.
  4318.   <li><b>What does this error message mean?</b>
  4319.       <br>Again, see the section on <cite><a href="#errors">Errors and
  4320.       warnings</a></cite>.
  4321.   <li><b>I tried to run analog from my browser, but it didn't work.</b>
  4322.   <br>Analog should not be run as a CGI program, or even put in the folder
  4323.       with your CGI programs, for security reasons. You should use the special
  4324.       <a href="#form">CGI program</a> instead.
  4325.   <li><b>Is analog Year 2000 compatible?</b>
  4326.       <br>Yes (and so are all previous versions). It interprets two-year dates
  4327.       in input as lying between 1970 & 2069 inclusive.
  4328. </ol>
  4329.  
  4330. <h3><a name="configfaq">B. Basic Configuration</a></h3>
  4331. Analog has lots of configuration commands, all of which are in the section on
  4332. <cite><a href="#custom">Customising analog</a></cite>. Here are some of
  4333. the most common questions. If your question isn't answered here, you could
  4334. also try looking in the <a href="#indx">index</a>.
  4335.  
  4336. <ol>
  4337.   <li><b>I want to make several different statistics pages. Do I have to
  4338.       install several copies of analog?</b>
  4339.       <br>No. Just install it once, and run it with different
  4340.       <a href="#CONFIGFILE">configuration files</a>.
  4341.   <li><b>My <kbd>analog.cfg</kbd> included lots of <kbd>CONFIGFILE</kbd>
  4342.       commands, but only one report was produced.</b>
  4343.       <br>Analog can only produce one report per run. To produce several
  4344.       reports, you have to run it several times.
  4345.   <li><b>Why doesn't the Daily Report only show the last six weeks?</b>
  4346.       <br>This is controlled by the
  4347.       <kbd><a href="#ROWS">FULLDAYROWS</a></kbd> command.
  4348.   <li><b>Why do the time reports all list 0 requests?</b>
  4349.       <br>They probably only list 0 requests for pages. Maybe you need to use
  4350.       <kbd><a href="#PAGEINCLUDE">PAGEINCLUDE</a></kbd> to count
  4351.       more files as pages.
  4352.   <li><b>How do I get the Request Report to list files with fewer than 20
  4353.       requests?</b>
  4354.       <br>Use the <kbd><a href="#FLOOR">REQFLOOR</a></kbd>
  4355.       command.
  4356.   <li><b>How do I ignore accesses from my site?</b>
  4357.       <br>Use the <kbd><a href="#include">HOSTEXCLUDE</a></kbd> command.
  4358.   <li><b>How do I ignore internal referrers in the Referrer Report?</b>
  4359.       <br>Use the <kbd><a href="#include">REFREPEXCLUDE</a></kbd> command.
  4360.   <li><b>How do I get information on just my pages, not everybody's?</b>
  4361.       <br>Use the <kbd><a href="#include">FILEINCLUDE</a></kbd> command.
  4362.   <li><b>I used the command "<kbd>DIREXCLUDE /mydir/</kbd>", but
  4363.       files in that directory were still listed.</b>
  4364.       <br><kbd>DIREXCLUDE</kbd> only affects the Directory Report, not the
  4365.       other reports. You want "<kbd>FILEEXCLUDE /mydir/*</kbd>"
  4366.       instead.
  4367.   <li><b>I used the command
  4368.       "<kbd>FILEEXCLUDE /cgi-bin/script.pl</kbd>", but that
  4369.       file was still listed in the Request Report.</b>
  4370.       <br>If the file has search arguments, you have to be a bit careful with
  4371.       <kbd>FILEEXCLUDE</kbd>. This is described in the section about
  4372.       <a href="#unintuitive">search arguments</a>.
  4373.   <li><b>Does the order of the commands matter in the configuration file?</b>
  4374.       Only occasionally. If you have two of one command, the later one will
  4375.       generally override the earlier one. Apart from that, commands can come
  4376.       in any order, except that <kbd><a href="#logfmt">LOGFORMAT</a></kbd>
  4377.       and <kbd><a href="#TIMEOFFSET">LOGTIMEOFFSET</a></kbd>
  4378.       commands must come before the <kbd>LOGFILE</kbd> to which they refer.
  4379.   <li><b>Why are my browser and referrer reports empty?</b>
  4380.       <br>Maybe your logfile doesn't contain any browser and referrer
  4381.       information?
  4382.   <li><b>Why isn't the Referrer Report sorted properly?</b>
  4383.       <br>It is sorted properly. But <a href="#args">search arguments</a>
  4384.       are also listed under the file they belong to, and this interrupts the
  4385.       ordering. If you set the
  4386.       <kbd><a href="#ARGSFLOOR">REFARGSFLOOR</a></kbd> high
  4387.       enough you won't see the search arguments. Or you can include the
  4388.       <a href="#othCOLS"><kbd>N</kbd> column</a> to make the
  4389.       ordering more obvious.
  4390.   <li><b>Why can't I have <kbd>P</kbd> in the <kbd>REQCOLS</kbd> or
  4391.       <kbd>REQSORTBY</kbd>?</b>
  4392.       <br>The number of page requests doesn't make sense in the Request Report
  4393.       because it's either the same as the number of requests (if the file is a
  4394.       page) or zero (if it isn't). If you want to list only pages in this
  4395.       report, use <kbd>REQINCLUDE pages</kbd> instead.
  4396.   <li><b>I want to list (<i>or</i> not to list) referrers with their search
  4397.       arguments in the Referrer Report.</b>
  4398.       <br>To see the search arguments you may need to set the
  4399.       <kbd><a href="#ARGSFLOOR">REFARGSFLOOR</a></kbd> lower. To
  4400.       avoid seeing them, you could set the <kbd>REFARGSFLOOR</kbd> higher, or
  4401.       alternatively use the
  4402.       <kbd><a href="#ARGSINCLUDE">REFARGSEXCLUDE</a></kbd> command
  4403.       to ignore them either for all files or just for particular files.
  4404.   <li><b>Can I find out which files each referrer pointed to?</b>
  4405.       <br><i>or</i> <b>Can I find out which files each host has read?</b>
  4406.       <br><i>or</i> <b>Can I find out which hosts have read each file?</b>
  4407.       <br><i>or</i> <b>Can I find out the number of hosts visiting on each
  4408.       day?</b>
  4409.       <br><i>or <b>lots of similar questions.</b></i>
  4410.       <br>There are lots of questions like this. They all want analog to
  4411.       cross-reference two sorts of item (e.g. files and referrers in the first
  4412.       example above, or hosts and dates in the last). Granted, these would be
  4413.       useful. But it is fundamental to analog's speed and minimal memory
  4414.       requirement that it only records statistics for each type of item
  4415.       individually, and doesn't record enough information to cross-reference
  4416.       them afterwards.
  4417.       <br>What you can do is to restrict the analysis to just requests from
  4418.       certain referrers (for example) with the 
  4419.       <kbd><a href="#include">REFINCLUDE</a></kbd> command, or to a
  4420.       particular time period with
  4421.       <a href="#FROMTO"><kbd>FROM</kbd> and <kbd>TO</kbd></a>.
  4422.       This is often good enough.
  4423.   <li><b>Can I use <kbd>%d</kbd>, <kbd>%m</kbd> etc. in the
  4424.       <kbd>LOGFILE</kbd>, like I can in the
  4425.       <kbd><a href="#OUTFILE">OUTFILE</a></kbd></b>?
  4426.       <br>No. This is rarely useful, because you can only get
  4427.       at one logfile that way. If you're on Unix, you can embed the date in
  4428.       the logfile name using the <kbd>date</kbd> command: for example,
  4429.       <pre>analog access.`date +%Y%m%d`.log</pre>
  4430.   <li><b>I get the message "logfiles overlap" even though the two
  4431.       logfiles contain completely separate requests.</b>
  4432.       <br>This message is based only on the dates of the files, not the
  4433.       contents. If you're sure there is no problem, you can turn it off with
  4434.       the command <kbd><a href="#debug">WARNINGS -L</a></kbd>.
  4435.   <li><b>Can I get data on individual visitors, or visits, to my site?</b>
  4436.       <br>No, it's not technically possible, and don't believe any program
  4437.       which tells you it is. See the section on
  4438.       <cite><a href="#webworks">How the web works</a></cite> for details.
  4439.   <li><b>Can I change the background colour of my output?</b>
  4440.       <br>Yes. The correct way to do this is to write a style sheet, and then
  4441.       use the <kbd><a href="#STYLESHEET">STYLESHEET</a></kbd>
  4442.       command.
  4443.   <li><b>Can I change the way dates are formatted in the output?</b>
  4444.       <br><i>or</i> <b>Can I change some of the phrases in the output?</b>
  4445.       <br>Yes, by editing the <a href="#LANGUAGE">language
  4446.       file</a>.
  4447. </ol>
  4448.  
  4449. <h3><a name="underfaq">C. Understanding the Output</a></h3>
  4450. Most of the questions in this category are answered in the section on
  4451. <cite><a href="#meaning">What the results mean</a></cite>, which I really
  4452. recommend you read if you want to understand what analog is telling you.
  4453.  
  4454. <ol>
  4455.   <li><b>How do I find out the number of hits from your data?</b>
  4456.       <br>I don't use the word <i>hits</i>, because people use it in
  4457.       different ways, so it's misleading. I use <i>requests</i> for the
  4458.       number of transfers of any type of file (text, graphics, ...), and
  4459.       <i>page requests</i> for the number of transfers of HTML pages. See the
  4460.       section on <cite><a href="#defns">Analog's definitions</a></cite>
  4461.       for more information.
  4462.   <li><b>Why are there so many referrers from my own site?</b>
  4463.       <br>These come from all the internal links on your site, and all the
  4464.       graphics on your pages. See the section on
  4465.       <cite><a href="#webworks">How the web works</a></cite> for more
  4466.       information. If you don't want to see them, you can use
  4467.       <kbd><a href="#outputexcludes">REFREPEXCLUDE</a></kbd> to
  4468.       exclude them.
  4469.   <li><b>Why doesn't analog agree with the counter on my page?</b>
  4470.       <br>There are lots of possible reasons. Do they both start from
  4471.       the same date? Are you just looking at requests for that one page with
  4472.       analog, not for all your other pages and graphics? Also, analog will
  4473.       record all requests to that page; if it's a graphic, your counter will
  4474.       only measure requests from people on graphical browsers that reached
  4475.       that place on the page.
  4476.   <li><b>Why do I only get "unresolved numerical addresses" in the domain
  4477.       report?</b>
  4478.       <br>Your server only records the numerical IP address of the hosts that
  4479.       contact you, not their names. Read the section about
  4480.       <cite><a href="#dns">DNS lookups</a></cite>, or turn DNS resolution
  4481.       on in your server.
  4482.   <li><b>Why are my click-thru's (<i>or</i> CGI scripts) not listed in the
  4483.       Request Report?</b>
  4484.       <br>If they cause a redirection to another page, they will be listed in
  4485.       the Redirection Report, rather than the Request Report.
  4486.   <li><b>Why are directories listed in the Request Report?</b>
  4487.       <br>They are not directories, they are pages with the same name as
  4488.       the directory. For example, I have both a directory called
  4489.       <kbd>/analog/</kbd> and a page called <kbd>/analog/</kbd> (which happens
  4490.       to be the same as <kbd>/analog/index.html</kbd>).
  4491.   <li><b>When someone reads one of my pdf files, it scores dozens of hits.</b>
  4492.       <br>PDF files are often downloaded and read one page at a time, and each
  4493.       page will then count as a separate request. Although this is not ideal,
  4494.       it's much less clear what to do about it. Analog has no way of knowing
  4495.       how many pages constituted a single download in the reader's mind. As
  4496.       usual, we can only reliably report how many requests there were at the
  4497.       server, not guess what users did with the file later.
  4498. </ol>
  4499.  
  4500. <h3><a name="advfaq">D. Advanced Usage</a></h3>
  4501. <ol>
  4502.   <li><b>How can I do such-and-such with a command line option?</b>
  4503.       <br>Use the <kbd><a href="#plusC">+C</a></kbd> option to put
  4504.       any configuration command on the command line.
  4505.   <li><b>I want a list of all command line arguments.</b>
  4506.       <br>There is a list in the <a href="#clargs">index</a>.
  4507.   <li><b>Can analog read FTP logfiles?</b>
  4508.       <br>Yes. If you are using the xferlog format, then there is a
  4509.       configuration file to help you in the <kbd>examples</kbd>
  4510.       directory. Otherwise you will have to write your own
  4511.       <kbd><a href="#logfmt">LOGFORMAT</a></kbd>. (You probably won't be
  4512.       able to read anything other than the lines corresponding to file
  4513.       transfers.)
  4514.   <li><b>How can I run analog automatically every day?</b>
  4515.       <br>This depends on your particular machine. On Unix, you need to run
  4516.       analog as a cron job (see "man cron"). This is my cron command
  4517.       to run it at 1:50am every day:
  4518.       <br><kbd>50 1 * * * $HOME/bin/analog</kbd>
  4519.       <br>On Windows NT you can do the same with the at command, but only an
  4520.       administrator can run at. On Windows 98, it should be possible with the
  4521.       Task Scheduler, although I haven't tried it. On Windows 95 it's not
  4522.       possible as far as I know.
  4523.       <br>On Mac, there are programs called
  4524.       <a href="http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cfg/chris-cron-10a7.hqx">Cron</a> or
  4525.       <a href="http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/app/time/">CronoTask</a>
  4526.       to do this.
  4527.   <li><b>I'm setting up IIS. Which logfile format should I use?</b>
  4528.       <br>The W3C format is probably best. You can turn fields on and off in
  4529.       this format. And it contains all the possible fields which can be
  4530.       logged, which the other formats do not. However, it is important to turn
  4531.       the date field on (it's off by default), not just to log the date once
  4532.       at the top: see the section on <a href="#dateonly">problems
  4533.       with logfile formats</a> for why.
  4534.   <li><b>I host lots of virtual domains. How should I set up analog?</b>
  4535.       <br>There's a file in the <kbd>examples</kbd> directory which discusses
  4536.       this issue.
  4537.   <li><b>Can I make multiple reports with one pass through the logfile?</b>
  4538.       <br>Not at the moment. I want to do this in a future version, but it will
  4539.       require some considerable work.
  4540.   <li><b>I ran out of memory when trying to run analog. What can I do?</b>
  4541.       <br>See the section on <a href="#lowmem">Coping with low memory</a>.
  4542.   <li><b>You're processing 20,000,000 requests in under 10 minutes. Why is mine
  4543.       much slower?</b>
  4544.   <br><i>or</i> <b>Analog appears to stall.</b>
  4545.       <br>If you have <a href="#dns">DNS lookups</a> on, they are very
  4546.       slow. Otherwise, it probably depends on the speed of your computer and
  4547.       disks, and what other programs are running at the same time. You can
  4548.       use the <kbd><a href="#PROGRESSFREQ">PROGRESSFREQ</a></kbd>
  4549.       command to see 
  4550.       if it's really stalled or whether it's just being slow. If you are
  4551.       running out of memory, you might find analog's
  4552.       <kbd><a href="#lowmem">LOWMEM</a></kbd> commands helpful.
  4553.   <li><b>How do I make a link on my page that runs analog?</b>
  4554.       <br>Link to the <a href="#form">anlgform</a> program, with the
  4555.       desired options. But be careful about the load on your server.
  4556.   <li><b>Do I have to save all my old logfiles?</b>
  4557.       <br><i>or</i> <b>Can analog make statistics from an old report instead
  4558.       of reading the whole logfile again?</b>
  4559.       <br>These questions are answered in the section about
  4560.       <cite><a href="#cache">Cache files</a></cite>.
  4561.   <li><b>Can analog write to a database or spreadsheet?</b>
  4562.       <br>Use the <a href="#compout">computer-readable output style</a>,
  4563.       which can export to CSV. Or if what you really want to do is to run
  4564.       analog again without re-reading the logfiles, read the section about
  4565.       <cite><a href="#cache">Cache files</a></cite>.
  4566. </ol>
  4567.  
  4568. <h3><a name="formfaq">E. Form Interface</a></h3>
  4569. There is also a section on <a href="#trouble">troubleshooting</a> in
  4570. the documentation about the form interface.
  4571.  
  4572. <ol>
  4573.   <li><b>I couldn't make the form run.</b>
  4574.       <br>Have you made analog work without the form? Have you run
  4575.       <kbd>anlgform.pl</kbd> from the command line as explained in the section
  4576.       on <a href="#trouble">troubleshooting</a>?
  4577.   <li><b>How can I specify different logfiles from the form interface?</b>
  4578.       <br>Just add a new field to the form with <kbd>name=LOGFILE</kbd>
  4579.   <li><b>I specified <kbd>LOGFILE=/var/log/apache/*</kbd></b> from the form
  4580.       but it didn't work.
  4581.       <br>On the form, you can't use wildcards in the <kbd>LOGFILE</kbd>
  4582.       name for <a href="#security">security reasons</a>.
  4583.   <li><b>My browser showed me anlgform.pl, rather than running it.</b>
  4584.       <br>You have to tell the server to execute the CGI program, not just
  4585.       send it out like it would for a normal file. Often this is done by
  4586.       putting it in a special <kbd>/cgi-bin/</kbd> directory.
  4587.   <li><b>Why does the form interface give "Document Returned no
  4588.       Data"?</b>
  4589.       <br>If it doesn't happen for a while, then probably the server is giving
  4590.       up before the analog process has finished running. Increase the timeout
  4591.       interval on the server.
  4592.   <li><b>The images don't appear when running analog from the form
  4593.       interface.</b>
  4594.       <br>You probably need to set the
  4595.       <kbd><a href="#IMAGEDIR">IMAGEDIR</a></kbd>. If the images
  4596.       are in your <kbd>/cgi-bin/</kbd> directory, the server will normally try
  4597.       to execute them instead of just sending them out.
  4598.   <li><b>Why do I get some reports that weren't requested on the form?</b>
  4599.       <br>If a report is neither included nor excluded on the form, the
  4600.       system default will be used. This will depend on your configuration files
  4601.       and on compile-time settings.
  4602. </ol>
  4603.  
  4604. <h3><a name="designfaq">F. Design Decisions</a></h3>
  4605. or "Why didn't you do it this way?"
  4606. <ol>
  4607.   <li><b>Why doesn't the <kbd>HEADERFILE</kbd> replace the whole
  4608.       <kbd><head></kbd> of the output file?</b>
  4609.       <br>Because you almost never get valid HTML that way. Use a
  4610.       <a href="#STYLESHEET">style sheet</a> instead.
  4611.   <li><b>Why not use HTML tables?</b>
  4612.       <br>Most non-graphical browsers don't do a good job with tables. Also
  4613.       tables aren't available in HTML 2.0, which is the sort of HTML
  4614.       analog writes.
  4615.   <li><b>Why are you still using HTML 2.0?</b>
  4616.       <br>Unfortunately my bar charts aren't valid in HTML 4.0.
  4617.   <li><b>It would be better if you used png's instead of gif's.</b>
  4618.       <br>I'm aware of the issues. But png support isn't good enough even in
  4619.       new browsers; and I have always made a point of designing analog to work
  4620.       even on old browsers.
  4621.   <li><b>Why not just do DNS resolution of the hosts that actually make it
  4622.       into the Host Report?</b>
  4623.       <br>There is one theoretical and one practical problem. Theoretically,
  4624.       the problem is that which hosts do make it into the Host Report can
  4625.       change when the DNS lookups have been done. And practically, this
  4626.       wouldn't help identify the busiest countries or organisations, which is
  4627.       usually what you really want to know. However, there is a Perl script on
  4628.       the <a href="#helpers">helper applications page</a> to do this.
  4629.   <li><b>Couldn't you do the DNS lookups faster with threads?</b>
  4630.       <br>The problem is, the standard commands for DNS lookups are not
  4631.       thread-safe on many platforms, so it would involve a lot of
  4632.       platform-specific code. Again, there are programs for specific platforms
  4633.       on the <a href="#helpers">helper applications page</a>.
  4634.   <li><b>Why doesn't analog analyse the error_log?</b>
  4635.       <br>This is answered in detail on the
  4636.       <cite><a href="#abolished290b1">What's new?</a></cite>
  4637.       page. But
  4638.       in summary, it's too difficult because each server has a different format
  4639.       for its error log. The various failure reports are good enough for most
  4640.       purposes.
  4641.   <li><b>My server lists local names in the logfile. Can you put a common
  4642.       suffix on them automatically?</b>
  4643.       <br>This wouldn't be a good idea by default, because things like
  4644.       "unknown" would get the suffix. You can always add them using
  4645.       <kbd><a href="#useraliases">HOSTALIAS</a></kbd>. On operating
  4646.       systems with regular expressions, there is an example to accomplish this
  4647.       in the <a href="#aliasregexp">section about aliases</a>.
  4648.   <li><b>Can you extrapolate from the current month's partial data to produce
  4649.       a prediction for the whole month, based on the rate so far?</b>
  4650.       <br>No. There are too many problems in trying to produce anything
  4651.       sensible, especially near the beginning of the month. Different days of
  4652.       the week and different times of day cause lots of problems. I would
  4653.       prefer to produce raw accurate data than suspect derived data.
  4654.   <li><b>Can you extend the Domain Report to say which US states people visited
  4655.       from?</b>
  4656.       <br>No. Some programs pretend to do this, but you can actually only tell
  4657.       which state the computer the person was using is in, which may be quite
  4658.       different from where the user was for ISP's or other large organisations.
  4659.   <li><b>Why not use language codes instead of country codes for the names
  4660.       of the language files?</b>
  4661.       <br>People are more familiar with the country codes. And not all of my
  4662.       languages have language codes anyway.
  4663.   <li><b>Why don't you sell analog?</b>
  4664.       <br>I didn't write analog for the money, and I'm happy just to see
  4665.       people use it. Also, by making it open source, lots of people send me
  4666.       ideas and code to include in future versions. How do you think I got all
  4667.       those languages? (Of course, if you want to send me money, or gifts in
  4668.       kind, or even just postcards...).
  4669. </ol>
  4670.  
  4671. <hr>
  4672. If there's still something you can't figure out, see the
  4673. <a href="#mailing">next section</a> for how to get help with analog.
  4674. <hr>
  4675. <hr>
  4676. <a name="mailing"><h2>Mailing lists</h2>
  4677. </a>
  4678. I welcome mail about analog, both praise and bug reports! I and others are
  4679. also usually happy to help people who have trouble with analog: it helps me
  4680. to find bugs, and know where the documentation is unclear.
  4681.  
  4682. <p>
  4683. There are three mailing lists for analog.
  4684. <dl>
  4685. <dt><kbd>analog-announce</kbd>
  4686. <dd>Announcements about analog. I post to this when there are new versions,
  4687. for example. Usually only gets a few messages a year.
  4688. <dt><kbd>analog-help</kbd>
  4689. <dd>Getting help with analog from experienced users. This is the place to go
  4690. if you have trouble setting up or configuring the program. Usually you will
  4691. get a swift reply. <em>You have to subscribe to the list before you can send a
  4692. message</em>. There is also a
  4693. <a href="http://www.mail-archive.com/analog-help@lists.isite.net/">searchable
  4694. web archive</a> of the list.
  4695. <dt><kbd>analog-author</kbd>
  4696. <dd>This just goes to me. Use for private comments, or other things that would
  4697. not be suitable for the <kbd>analog-help</kbd> list. You may or may not get a
  4698. swift reply, depending how busy I am with other things.
  4699. </dl>
  4700.  
  4701. <p>
  4702. To subscribe to the analog-announce mailing list, send a message to
  4703. <a href="mailto:analog-announce-request@lists.isite.net">analog-announce-request@lists.isite.net</a>
  4704. with the word <kbd>subscribe</kbd> in the main body of the message. Note that
  4705. the word has to be in the body of the message, not the subject. Also please
  4706. note the <kbd>-request</kbd> part of the address.
  4707.  
  4708. <p>
  4709. If you want to get help with analog, please check the following simple things
  4710. first.
  4711. <ol>
  4712.   <li>Read the <a href="#faq">FAQ</a>. Maybe I've answered your question
  4713.       already. If I have, I'll just direct you to the FAQ, not answer it
  4714.       again.
  4715.   <li>Read the
  4716.       <a href="http://www.statslab.cam.ac.uk/~sret1/analog/bugs.html">list of
  4717.       known bugs</a> at my site, to see if your bug is already known about.
  4718.   <li>Read the other relevant pages of the Readme, particularly the sections
  4719.       on <cite><a href="#start">Starting to use analog</a></cite> and
  4720.       <cite><a href="#custom">Customising analog</a></cite>. You may also
  4721.       find the <a href="#indx">index</a> useful. I don't appreciate people
  4722.       who are too lazy to read the documentation. (If the documentation is
  4723.       unclear, or the relevant paragraph is too well hidden, then that's a
  4724.       different matter. Of course I want to know about that.)
  4725.   <li>Have a look in the
  4726.       <a href="http://www.mail-archive.com/analog-help@lists.isite.net/">web
  4727.       archive</a> of the mailing list to see if your question has already been
  4728.       answered there.
  4729.   <li>If analog isn't doing what you thought you asked it to, then run it with
  4730.       the <kbd><a href="#settings">SETTINGS ON</a></kbd>
  4731.       configuration
  4732.       command, and see what options it thinks it's meant to be using.
  4733. </ol>
  4734. I'm sorry to be so fussy, but a lot of the mail on the list really needn't
  4735. have been sent at all, and just wastes the time of everybody on the list. As
  4736. I say, I really do welcome genuine mail.
  4737. <p>
  4738. If you still need help, write to the analog-help mailing list. First you have
  4739. to subscribe (you can't send mail without subscribing) by sending a message to
  4740. <a href="mailto:analog-help-request@lists.isite.net">analog-help-request@lists.isite.net</a>
  4741. with the word <kbd>subscribe</kbd> in the main body of the message. (Note that
  4742. the word has to be in the body of the message, not the subject.) After you've
  4743. received an acknowledgement that you have subscribed, you can send mail to
  4744. analog-help@lists.isite.net. Don't try and use this address for subscribing
  4745. though. It won't work!
  4746.  
  4747. <p>
  4748. Please do the following when you send mail to the list.
  4749. <ol>
  4750.   <li>Describe exactly what you did, what you expected, and what the computer
  4751.       did. Include the <em>exact text</em> of any error messages, not a
  4752.       précis.
  4753.   <li>Mention which version of analog you are using, on which operating
  4754.       system.
  4755.   <li>Give your mail a subject line which indicates immediately what aspect of
  4756.       analog it is about. (This is useful for the <a href="http://www.mail-archive.com/analog-help@lists.isite.net/">archive</a>).
  4757.   <li>Do <strong>not</strong> send long files or attachments unless you're
  4758.       asked to. We do not want to see your configuration file, your header
  4759.       file, your output file, or any logfile over 10 lines long. They are
  4760.       almost always useless to us. And anyway, excessively long messages will
  4761.       be rejected by the mailing list server.
  4762. </ol>
  4763. <p>
  4764. If you want to send a private message to me, you can send it to me at
  4765. <a href="mailto:analog-author@lists.isite.net">analog-author@lists.isite.net</a>.
  4766. Please don't use this address for user support questions: keep them on the
  4767. <kbd>analog-help</kbd> list.
  4768.  
  4769. <p>
  4770. Many thanks to <a href="http://www.isite.net/">ISite</a> for providing these
  4771. mailing lists for me, and to <a href="http://www.mail-archive.com/">The Mail
  4772. Archive</a> for archiving the analog-help list.
  4773.  
  4774. <hr>
  4775. <hr>
  4776. <a name="helpers"><h2>Helper applications</h2>
  4777. </a>
  4778. Some people have written helper applications for analog. These are independent
  4779. programs which work together with analog to make certain tasks easier. There
  4780. are graphical configuration tools, for example, or tools which post-process
  4781. analog's output to produce graphs. There are tools to do the DNS lookups more
  4782. quickly, configuration files for certain jobs, and lots of other things.
  4783.  
  4784. <p>
  4785. These helper applications are all listed at the analog site. The list is
  4786. growing quite quickly, so I'm not distributing it with the program. But I
  4787. strongly recommend you go to the
  4788. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog home page</a>
  4789. (or even better, to your local mirror site) and check it out.
  4790.  
  4791. <p>
  4792. There are also some example configuration files in the <kbd>examples</kbd>
  4793. directory or folder distributed with the program.
  4794.  
  4795. <hr>
  4796. <hr>
  4797. <a name="acknow"><h2>Acknowledgements</h2>
  4798. </a>
  4799. Many people have helped me with analog, and I can't thank them all
  4800. specifically. But I do appreciate everyone who's given me feedback or sent me
  4801. bug reports.
  4802.  
  4803. <p>
  4804. Thanks are due to the author of
  4805. <a HREF="http://www.eit.com/software/getstats/">getstats</a>,
  4806. Kevin Hughes. In the days before analog there were only three serious logfile
  4807. analysis programs, and only one of them, getstats, had attractive output. I
  4808. wrote analog when getstats stopped being able to cope with the size of our
  4809. logfile, but my output still looks somewhat similar to his.
  4810.  
  4811. <p>
  4812. Thanks are also due to all those who helped in the early stages of writing
  4813. this program, and gave me the encouragement to continue with analog and to
  4814. release it publicly. Those who made helpful suggestions during beta testing are
  4815. numerous, but I must mention particularly Dan Anderson, Martyn Johnson,
  4816. Joe Ramey, Chris Ritson, Quentin Stafford-Fraser and Dave Stanworth. Above
  4817. all Gareth McCaughan gave me lots of programming advice. The program would
  4818. have run much more slowly without him.
  4819.  
  4820. <p>
  4821. Many people have provided mirror sites for analog, starting with
  4822. Dave Stanworth (again!). The full list of mirror sites is listed <a
  4823. href="http://www.statslab.cam.ac.uk/~sret1/analog/mirrors.html">elsewhere</a>;
  4824. thanks to all of them. Many thanks also to
  4825. <a href="http://www.isite.net/">ISite</a> for providing the mailing lists, and
  4826. to <a href="http://www.mail-archive.com/">The Mail Archive</a> for archiving
  4827. the analog-help list.
  4828.  
  4829. <p>
  4830. Mark Roedel first suggested porting analog to different platforms, and made
  4831. the original DOS port. Shortly afterwards, Jason Linhart made the Mac port,
  4832. and has continued to contribute lots of extra code for that platform and for
  4833. the program in general. The Mac version also includes code contributed by
  4834. Stephan Somogyi and Nigel Perry, and uses the
  4835. <a href="http://www.cdrom.com/pub/infozip/zlib/">ZLib library</a> by
  4836. Jean-loup Gailly & Mark Adler. Later ports were made by Dave Jones, Martin
  4837. Zinser & Rick Dyson (OpenVMS), Magnus Hagander (Win32),
  4838. Nick Smith (Acorn RiscOS), Scott Tadman (BeOS), and Martin Kraemer &
  4839. Holger Schranz (BS2000/OSD). Ivan Martinez compiles the OS/2 version.
  4840. The BS2000/OSD port includes code developed by the Apache Group for use in
  4841. the <a href="http://www.apache.org/">Apache HTTP server project</a>.
  4842. If <kbd>NEED_MEMMOVE</kbd> is defined at compile time, then this product
  4843. includes software developed by the University of California, Berkeley and its
  4844. contributors.
  4845. <p>
  4846. The form interface is based on an idea by James Dean Palmer. Thanks to all the
  4847. other people who have contributed bits of code too: I apologise for not having
  4848. room to name all of them. And thanks to those who have written
  4849. <a href="#helpers">helper applications</a>, for making analog more usable.
  4850.  
  4851. <p>
  4852. For the translations into other languages, many thanks are due to the
  4853. following:
  4854. Tigran Nazarian (Armenian), Emir Alikadic (Bosnian), Francesc Rocher,
  4855. M. Mercè Llauge & Francesc Burrull i Mestres (Catalan),
  4856. Yang Meng (Simplified Chinese), Andrew Choi (Traditional Chinese),
  4857. Jan Simek & Karel Fajkus (Czech), Adrian Price (Danish),
  4858. Ferry van het Groenewoud, Joost Baaij & Dimitry Smagghe (Dutch), 
  4859. Henrik Huhtinen, Steve Kelly & Andrew Staples (Finnish),
  4860. Patrice Lafont, Lucien Vieira, Jean-Marc Coursimault &
  4861. Lionel Delaude (French), Mario Ellebrecht, Martin Kraemer, Holger Schranz,
  4862. Thomas Jacob, Thomas Frings & Georg Schwarz (German),
  4863. Dimitris Xenakis (Greek), Laszlo Nemeth (Hungarian), Gustaf Gustafsson
  4864. (Icelandic), Furio Ercolessi, Luca Andreucci & Alessio Bragadini
  4865. (Italian), Takayuki Matsuki, Stephen Obenski and Motonobu
  4866. Takahashi (Japanese), Byungkwan Kim (Korean), Jurijs Turjanskis (Latvian),
  4867. Ingrid (Lithuanian), Jan-Aage Bruvoll, Espen Bjarnø & Pål
  4868. Løberg (Norwegian Bokmål), Magni Onsøien (Norwegian
  4869. Nynorsk), Wlodek Lapot, Tomek Wozniak & Marcin Sochacki (Polish), Ivan
  4870. Martinez (Brazilian Portuguese), Jaime Carvalho e Silva (European Portugese),
  4871. Alex Mihaila (Romanian), San Sanych Timofeev, Boris Litvinenko &
  4872. Vyacheslav Nikitich (Russian), Mile Peric (Serbian), Stefan Billik (Slovak),
  4873. Andrej Zizmond & Dalibor Cvijetinoviè (Slovene),
  4874. Javier Solis, Alexander Velasquez, Alfredo Sola, Martin Perez &
  4875. Nelson Tactuk (Spanish), Björn Malmberg, Frank Osterberg &
  4876. Wesley Schaal (Swedish), Nezih Erkman (Turkish),
  4877. and Yaroslav Boychuk (Ukrainian).
  4878.  
  4879. <p>
  4880. Finally, thanks to all of you for using the program!
  4881. <hr>
  4882. <hr>
  4883. <a name="whatsnew"><h2>What's new in this version?</h2>
  4884. </a>
  4885. This section lists the major new features in each version of analog. There's
  4886. also another section about <a href="#update">how to upgrade</a> from older
  4887. versions of analog, listing which commands have changed or been abolished, or
  4888. how the output of this version differs from that of previous versions.
  4889.  
  4890. <dl>
  4891.   <dt><b><a name="new403">4.03</a></b> (21-Feb-00)
  4892.   <dd>Fixed several small bugs.
  4893.       <br>New command <kbd><a href="#RUNTIME">RUNTIME</a></kbd>.
  4894.       <br>Brazilian Portuguese language files and Swedish domains files.
  4895.       Corrections to Dutch.
  4896.   <dt><b><a name="new402">4.02</a></b> (31-Jan-00)
  4897.   <dd>New command <kbd><a href="#SCC">SEARCHCHARCONVERT</a></kbd>.
  4898.       <br>Support for Apache's new <kbd>%q</kbd> code in
  4899.       <kbd>APACHELOGFORMAT</kbd>.
  4900.       <br>Fix for search reports causing crashes on Windows.
  4901.       <br>New language: Czech. Corrections for Serbian, Slovene and Ukrainian.
  4902.   <dt><b><a name="new401">4.01</a></b> (17-Dec-99)
  4903.   <dd>New command <kbd><a href="#CASE">USERCASE</a></kbd>.
  4904.       <br>Some of the default paths have changed in <kbd>anlghead.h</kbd>.
  4905.       <br>Improvements to OpenVMS port.
  4906.       <br>Language files included for Armenian, Bosnian, Catalan,
  4907.       traditional Chinese, Dutch, Finnish, German, Italian, Slovak, Slovene,
  4908.       Spanish, Swedish & Ukrainian; corrections to Russian & Turkish.
  4909.   <dt><b><a name="new40">4.0</a></b> (16-Nov-99)
  4910.   <dd>Simplified Chinese, Danish, Japanese, Portuguese & Serbian language
  4911.       files included.
  4912.       <br>Otherwise only small changes since 3.90beta2.
  4913.   <dt><b><a name="new390b2">3.90beta2</a></b> (02-Nov-99)
  4914.   <dd>It is now recommended that you don't run analog as a CGI program for
  4915.       <a href="#notcgi">security reasons</a>. (The <kbd>CGI</kbd>
  4916.       command is still present, but it is now not documented.)<br>
  4917.       The Organisation Report is now
  4918.       <a href="#hierreps">hierarchical</a>.<br>
  4919.       The Browser Summary is now arranged by major version number. (See
  4920.       <a href="#update">notes on upgrading</a>.)<br>
  4921.       Non-exact bytes are now given to 3 decimal places.<br>
  4922.       <kbd><a href="#GOTOS">GOTOS FEW</a></kbd> puts the "Go
  4923.       To" lines just at the top and bottom of the output.<br>
  4924.       <kbd>PRINTVARS</kbd> has been renamed
  4925.       <kbd><a href="#settings">SETTINGS</a></kbd>.<br>
  4926.       <kbd><a href="#settings">-settings</a></kbd> output improved,
  4927.       especially with <kbd>OUTPUT NONE</kbd>.<br>
  4928.       Split <kbd>PAGEWIDTH</kbd> into
  4929.       <kbd><a href="#PAGEWIDTH">HTMLPAGEWIDTH</a></kbd> and
  4930.       <kbd><a href="#PAGEWIDTH">ASCIIPAGEWIDTH</a></kbd>.<br>
  4931.       Includes language files for French, Greek, Norwegian (Bokmål
  4932.       & Nynorsk), Polish, Russian and Turkish.<br>
  4933.       New configuration file <kbd>examples/big.cfg</kbd> containing most
  4934.       commands.
  4935.   <dt><b><a name="new390b1">3.90beta1</a></b> (07-Oct-99)
  4936.   <dd>First beta test for version 4. The most important new features are:
  4937.       <ul>
  4938.     <li>Five new reports: Organisation Report, Operating System Report,
  4939.         Search Word Report, Search Query Report, Processing Time Report.
  4940.     <li>Browser Summary improved (will <a href="#update">change
  4941.         results</a>).
  4942.     <li><a href="#form">Form interface</a> completely rewritten, and
  4943.         considerably simplified.
  4944.     <li>Multiple *'s now allowed on left-hand side of
  4945.         <a href="#useraliases"><kbd>ALIAS</kbd>es</a>.
  4946.     <li>Regular expressions allowed in
  4947.         <a href="#incregexp"><kbd>INCLUDE</kbd>s &
  4948.         <kbd>EXCLUDE</kbd>s</a>, and
  4949.         <a href="#aliasregexp"><kbd>ALIAS</kbd>es</a>.
  4950.     <li>The <a href="#outputexcludes">output
  4951.         <kbd>INCLUDE</kbd>s and <kbd>EXCLUDE</kbd>s</a> now apply to the
  4952.         lower levels of a <a href="#hierreps">hierarchical report</a>
  4953.         as well as the top level.
  4954.     <li>New commands: <kbd><a href="#form">CGI</a></kbd>,
  4955.         <kbd><a href="#STYLESHEET">STYLESHEET</a></kbd> and
  4956.         <kbd><a href="#ERRLINELENGTH">ERRLINELENGTH</a></kbd>.
  4957.     <li>New <a href="#othCOLS">column <kbd>N</kbd></a> in most
  4958.         reports.
  4959.     <li><kbd><a href="#debugs">DEBUG C</a></kbd> now reports
  4960.         which part of a corrupt logfile line is corrupt.
  4961.     <li>Non-exact bytes are now displayed as, e.g., 47.68 Mbytes instead of
  4962.         48,832 kbytes. This should be less confusing.
  4963.     <li>Timestamps added to
  4964.         <kbd><a href="#PROGRESSFREQ">PROGRESSFREQ</a></kbd>
  4965.         reports.
  4966.     <li>The <a href="#dns">DNS file</a> has a new time encoding.
  4967.     <li>Header files split up to make <kbd>anlghead.h</kbd> simpler.
  4968.     <li>Form interfaces in German and U.S. English included.
  4969.     <li>New documentation about <a href="#args">search arguments</a>.
  4970.     <li>New <kbd>examples</kbd> directory.
  4971.     <li>New <a href="Licence.txt">licence</a>. (Nearly the same, just
  4972.         clarified, and slightly loosened).
  4973.       </ul>
  4974.       Note: most languages don't work in this beta-test version, but should be
  4975.       added again by version 4. (The language files are included in the
  4976.       distribution, but contain lots of English strings).
  4977.   <dt><b><a href="#wasnew3">What was new in version 3?</a></b>
  4978.   <dt><b><a href="#wasnew2">What was new in version 2?</a></b>
  4979.   <dt><b><a href="#wasnew1">What was new in version 1?</a></b>
  4980. </dl>
  4981.  
  4982. <hr>
  4983. <hr>
  4984. <a name="update"><h2>Upgrading from earlier versions</h2>
  4985. </a>
  4986. This section lists those commands which existed in older versions of analog,
  4987. but which have been changed or abolished in this version. It also lists reasons
  4988. why the same input might now produce different output. The new features in this
  4989. version are listed in the section <cite><a href="#whatsnew">What's new in
  4990. this version?</a></cite>.
  4991.  
  4992. <h2><a name="up40">Upgrading from 4.0 and earlier</a></h2>
  4993. <ul>
  4994.   <li>Some of the default paths have changed in <kbd>anlghead.h</kbd>.
  4995. </ul>
  4996.  
  4997. <h2><a name="up390b1">Upgrading from 3.90beta1 and earlier</a></h2>
  4998. <ul>
  4999.   <li>It is now recommended that you don't run analog as a CGI program, or put
  5000.       it in the directory with your CGI programs, for
  5001.       <a href="#notcgi">security reasons</a>.
  5002.   <li>Each browser in the Browser Summary is now sorted by major version
  5003.       number then minor version number. So <kbd>SUBBROW */*</kbd> will now
  5004.       only show the major versions. To get all the minor versions, you need
  5005.       <kbd>SUBBROW */*.*</kbd>
  5006.   <li><kbd>PAGEWIDTH</kbd> has been replaced by
  5007.       <kbd><a href="#PAGEWIDTH">HTMLPAGEWIDTH</a></kbd> and
  5008.       <kbd><a href="#PAGEWIDTH">ASCIIPAGEWIDTH</a></kbd>.
  5009.   <li><kbd>PRINTVARS</kbd> has been renamed
  5010.       <kbd><a href="#settings">SETTINGS</a></kbd>.
  5011. </ul>
  5012.  
  5013. <h2><a name="up332">Upgrading from 3.32 and earlier</a></h2>
  5014. <ul>
  5015.   <li>The form interface has been completely rewritten, and old versions of
  5016.       <kbd>anlgform.html</kbd> will not work with this version.
  5017.   <li>The Browser Summary now diagnoses MSIE, Opera and WebTV browsers
  5018.       better. This will cause differences in output from previous versions.
  5019.   <li>With <kbd>RAWBYTES OFF</kbd>, bytes are now listed as, for example,
  5020.       47.68 Mbytes instead of 48,832 kbytes. This should be less confusing.
  5021.   <li>The <a href="#dns">DNS file</a> has a new time encoding. It's only a
  5022.       few hours different, so I haven't made any special provision for it. The
  5023.       effect is that the <kbd><a href="#dns">DNSGOODHOURS</a></kbd> and
  5024.       <kbd><a href="#dns">DNSBADHOURS</a></kbd> may be a few hours out
  5025.       for existing entries (but not for new ones).
  5026.   <li>Most languages don't work in this beta version, but should be added
  5027.       again by version 4. (The language files are included in the
  5028.       distribution, but contain lots of English strings).
  5029. </ul>
  5030.  
  5031. <h2><a name="up33">Upgrading from 3.3 and earlier</a></h2>
  5032. <ul>
  5033.   <li>There is a new set of graphics in the <kbd>images</kbd> directory, which
  5034.       you will have to move to your web directory.
  5035.   <li>In the Mac version, if a configuration file is dragged onto the analog
  5036.       icon, it is used instead of, not as well as, the default configuration
  5037.       file.
  5038. </ul>
  5039.  
  5040. <h2><a name="up32">Upgrading from 3.2 and earlier</a></h2>
  5041. <ul>
  5042.   <li>In the <a href="#compout">computer-readable output style</a>, the
  5043.       line <kbd>L7</kbd>, the time the last seven days begins after, has been
  5044.       replaced by <kbd>E7</kbd>, the time the last seven days ends. This is
  5045.       for consistency with the other output styles.
  5046.   <li>Also in the computer-readable output, there is a new line reporting the
  5047.       floor and the <kbd>SORTBY</kbd> for the report. In 3.11 and earlier,
  5048.       this didn't exist, and in 3.2 it only reported the floor, not the
  5049.       <kbd>SORTBY</kbd>.
  5050.   <li><kbd>%R</kbd> (Mac-style filename) has been abolished in the
  5051.       <kbd>LOGFORMAT</kbd>. Just use plain <kbd>%r</kbd> instead.
  5052.   <li>It is no longer allowed to set the <kbd>CACHEOUTFILE</kbd> to be the
  5053.       same as a previous cache file.
  5054.   <li>The definition of the common log format and related formats changed
  5055.       between 3.11 & 3.2, and again between 3.2 & 3.3. This could
  5056.       cause differences in output, but they are likely to be only very minor.
  5057. </ul>
  5058.  
  5059. <h2><a name="up311">Upgrading from 3.11 and earlier</a></h2>
  5060. <ul>
  5061.   <li>Lines without a particular item now work properly with
  5062.       <kbd>INCLUDE</kbd> and <kbd>EXCLUDE</kbd> commands. For example, if
  5063.       you do an <kbd>INCLUDE</kbd> to look at only certain lines, then lines
  5064.       without that type of item at all will not now be included, whereas
  5065.       previously they would have been. This can make the results lower than in
  5066.       these earlier versions.
  5067.   <li>I have reluctantly removed support for NetPresenz logs. This hasn't
  5068.       worked for some time, and I have already been advising NetPresenz users
  5069.       not to use newer versions of analog because they could get wrong
  5070.       results. Unfortunately, fixing it would require a complete rewrite of
  5071.       the entire parsing code, which isn't going to happen any time soon. So
  5072.       my advice remains the same: continue to use version 2.11 or (even
  5073.       better) pre-process your logfiles into a form which analog can handle
  5074.       safely.
  5075.   <li>The English domains file has changed name from <kbd>domains.tab</kbd>
  5076.       to <kbd>ukdom.tab</kbd>.
  5077. </ul>
  5078.  
  5079. <h2><a name="up30winform">Upgrading from 3.0, Win32 form interface</a></h2>
  5080. <ul>
  5081. <li>If using the form interface on Windows, it is now necessary to put the
  5082. analog executable at <kbd>\analog\analog.exe</kbd> instead of
  5083. <kbd>\Program Files\analog\analog.exe</kbd>
  5084. </ul>
  5085.  
  5086. <h2><a name="up290b1">Upgrading from 2.90beta1</a></h2>
  5087. <ul>
  5088.   <li><kbd>LOGFORMAT MICROSOFT</kbd> has been replaced by
  5089.       <kbd>LOGFORMAT MICROSOFT-NA</kbd> and <kbd>LOGFORMAT MICROSOFT-INT</kbd>;
  5090.       and similarly for <kbd>LOGFORMAT NETPRESENZ</kbd>.
  5091. </ul>
  5092.  
  5093. <h2><a name="up211">Upgrading from 2.11 and earlier</a></h2>
  5094. <ul>
  5095.   <li>It is possible that there may be small discrepancies between the results
  5096.       from previous versions and the results from this version because the
  5097.       parsing code has changed, but any such differences should be minor.
  5098.       However...
  5099.   <li>If you used to use <kbd>REFEXCLUDE</kbd> or <kbd>BROWEXCLUDE</kbd>, you
  5100.       most likely now want
  5101.       <kbd><a href="#outputexcludes">REFREPEXCLUDE</a></kbd> or
  5102.       <kbd><a href="#outputexcludes">BROWREPEXCLUDE</a></kbd>
  5103.       instead, or you will exclude lots of lines that were previously included.
  5104.   <li>It is possible that this version may not automatically parse a logfile
  5105.       that previous versions could parse, because it checks more carefully
  5106.       that the logfile is in the format claimed. If so, you will have to use a
  5107.       <kbd><a href="#logfmt">LOGFORMAT</a></kbd> command.
  5108.   <li>Approximate host counting has been abolished, unless there's a
  5109.       significant demand for it.
  5110.   <li>Count of number of new hosts in last seven days abolished. It was too
  5111.       confusing because it depended on which old logfiles you analysed.
  5112.   <li>The Error Report has been abolished (together with the configuration
  5113.       commands <kbd>ERROR</kbd>, <kbd>ERRLOG</kbd> and <kbd>ERRMINOCCS</kbd>).
  5114.       See the <cite><a href="#whatsnew">What's new?</a></cite> page.
  5115.   <li>The <kbd>BROWLOG</kbd> and <kbd>REFLOG</kbd> commands have also been
  5116.       abolished: just use <kbd><a href="#logfile">LOGFILE</a></kbd>
  5117.       instead.
  5118.   <li>The <kbd>HASHSIZE</kbd> commands have been abolished: analog now chooses
  5119.       the size of the hash tables itself.
  5120.   <li>The <kbd>MINREQS</kbd> and similar options have been replaced by the
  5121.       <kbd><a href="#FLOOR">FLOOR</a></kbd> commands.
  5122.   <li>Only one <kbd>*</kbd> is now allowed on the left-hand side of aliases,
  5123.       to avoid ambiguities.
  5124.   <li>Automatic detection of log type is now on a per-file rather than a
  5125.       per-line basis.
  5126.   <li><kbd>ISPAGE</kbd> is now called
  5127.       <kbd><a href="#PAGEINCLUDE">PAGEINCLUDE</a></kbd>.
  5128.   <li><kbd>WITHARGS</kbd> and <kbd>REFWITHARGS</kbd> are now called
  5129.       <kbd><a href="#ARGSINCLUDE">ARGSINCLUDE</a></kbd> and
  5130.       <kbd><a href="#ARGSINCLUDE">REFARGSINCLUDE</a></kbd>.
  5131.   <li><kbd>MONTHLYBACK</kbd> is now called <kbd>MONTHBACK</kbd>.
  5132.   <li><kbd>FULLHOSTS</kbd> is now just called <kbd>HOST</kbd>.
  5133.   <li><kbd>LOGOURL</kbd> is now called <kbd>LOGO</kbd>.
  5134.   <li>The <kbd>UNIT</kbd> commands have been abolished. They weren't very
  5135.       useful, and they didn't make much sense with the different ways of
  5136.       displaying the time report bar charts. The unit is now always chosen
  5137.       automatically.
  5138.   <li><kbd>DIRLEVEL</kbd> has been abolished, because the
  5139.       <kbd><a href="#hierreps">SUBDIR</a></kbd> command is more general.
  5140.       Use <kbd>SUBDIR */*</kbd> or whatever instead.
  5141.   <li>Comments aren't allowed in the <a href="#domfile">domains file</a>.
  5142.       I don't think this should cause a problem.
  5143.   <li><kbd>GRAPHICAL</kbd> is abolished. Instead, use lower case letters with
  5144.       the <kbd>GRAPH</kbd> commands.
  5145.   <li><kbd>NUMLOOKUP</kbd> has been replaced by
  5146.       <kbd><a href="#dns">DNS</a></kbd>, and <kbd>DNSFRESHHOURS</kbd>
  5147.       by the commands <kbd><a href="#dns">DNSGOODHOURS and
  5148.       DNSBADHOURS</a></kbd>.
  5149.   <li>DNS cache files from previous versions are not compatible with this
  5150.       version.
  5151.   <li>You can't use <kbd>PAGES</kbd> in the columns or <kbd>SORTBY</kbd> or
  5152.       <kbd>FLOOR</kbd> for the Request Report. Use <kbd>REQINCLUDE pages</kbd>
  5153.       instead.
  5154.   <li><kbd>-</kbd> as a synonym for <kbd>none</kbd> has been abolished in some
  5155.       places, e.g., <kbd>HOSTURL</kbd>.
  5156.   <li>The following command line arguments have been abolished from earlier
  5157.       versions, many of the letters getting new meanings: <kbd>7</kbd>,
  5158.       <kbd>l</kbd>, <kbd>n</kbd>, <kbd>p</kbd>, <kbd>s</kbd>, <kbd>u</kbd>,
  5159.       <kbd>v</kbd>, <kbd>w</kbd>. (<kbd>-v</kbd> has moved to
  5160.       <kbd>-settings</kbd>.) Others have been changed since version 1.2 as
  5161.       well.
  5162. </ul>
  5163.  
  5164. <h2><a name="up20win">Upgrading from 2.0, Win32 users</a></h2>
  5165.  
  5166. <ul>
  5167.   <li>Filenames for logfiles etc. should now be given DOS-style, with
  5168.       backslashes, rather than Unix-style with forward slashes.
  5169. </ul>
  5170.  
  5171. <h2><a name="up192mac">Upgrading from 1.92 and earlier, Mac users</a></h2>
  5172.  
  5173. <ul>
  5174.   <li>There is no longer an automatic progress report. Use the
  5175.      <kbd><a href="#PROGRESSFREQ">PROGRESSFREQ</a></kbd> command
  5176.       instead.
  5177. </ul>
  5178.  
  5179. <h2><a name="up19b">Upgrading from 1.9beta's</a></h2>
  5180.  
  5181. <ul>
  5182.   <li>Use <kbd><a href="#outputexcludes">REQINCLUDE</a></kbd> and
  5183.       <kbd><a href="#LINKINCLUDE">LINKINCLUDE</a></kbd> instead of
  5184.       <kbd>REQTYPE</kbd> and <kbd>PAGELINKS</kbd>.
  5185. </ul>
  5186.  
  5187. <h2><a name="up12">Upgrading from 1.2's and earlier</a></h2>
  5188.  
  5189. <ul>
  5190.   <li>Use <a href="#include"><kbd>*INCLUDE</kbd> and
  5191.       <kbd>*EXCLUDE</kbd></a> instead of <kbd>*ONLY</kbd> and
  5192.       <kbd>*IGNORE</kbd>.
  5193.   <li>The syntax of the <kbd>*FLOOR</kbd> commands has changed.
  5194.   <li>Use <kbd>*SORTBY REQUESTS</kbd> or <kbd>BYTES</kbd> instead of
  5195.       <kbd>*SORTBY BYREQUESTS</kbd> or <kbd>BYBYTES</kbd>.
  5196. </ul>
  5197.  
  5198. <hr>
  5199. <hr>
  5200. <a name="wasnew3"><h2>What was new in version 3?</h2>
  5201. </a>
  5202. This section lists the new features which were in version 3 of analog.
  5203.  
  5204. <dl>
  5205.   <dt><b><a href="#whatsnew">What's new in version 4?</a></b>
  5206.   <dt><b><a name="new332">3.32</a></b> (02-Sep-99)
  5207.   <dd>Bug fixes, including:
  5208.       <ul>
  5209.     <li>Drag-and-drop on Mac now works.
  5210.     <li>Unsafe characters in hyperlinks now escaped.
  5211.     <li>One bug that caused crashes when printing deep Directory Reports
  5212.         fixed.
  5213.       </ul>
  5214.       New VMS build scripts. Let me know of any compilation problems.
  5215.       <br>Computer-readable output now reports version of analog used.
  5216.       <br>Improved some diagnostic messages.
  5217.       <br>New language Serbo-Croatian; new domains files for Italian and
  5218.       Russian; corrected Polish language files.
  5219.       <br>New documentation on
  5220.       <cite><a href="#reports">Analog's reports</a></cite> and
  5221.       <cite><a href="#quickref">Quick reference</a></cite>.
  5222.       <br>Now uses named anchors throughout the documentation, so that
  5223.       cross-references link to the right part of a page.
  5224.   <dt><b><a name="new331">3.31</a></b> (19-Jun-99)
  5225.   <dd>New command <kbd><a href="#BARSTYLE">BARSTYLE</a></kbd>;
  5226.       you will need to <a href="#up33">use new images</a>.
  5227.       <br>Russian language file corrected.
  5228.       <br>Some bug fixes, including one important one correcting cache file
  5229.       output.
  5230.   <dt><b><a name="new33">3.3</a></b> (19-May-99)
  5231.   <dd>New commands <kbd><a href="#ERRFILE">ERRFILE</a></kbd>,
  5232.       <kbd><a href="#dns">DNSLOCKFILE</a></kbd>,
  5233.       <kbd><a href="#Apache">APACHELOGFORMAT</a></kbd> and
  5234.       <kbd><a href="#DEFAULTLOGFORMAT">APACHEDEFAULTLOGFORMAT</a></kbd>.
  5235.       <br>Can include the date in the name of the
  5236.       <kbd><a href="#OUTFILE">OUTFILE</a></kbd> and the
  5237.       <kbd><a href="#cache">CACHEOUTFILE</a></kbd>.
  5238.       <br>Support for WebSite logfiles.
  5239.       <br>New token <kbd>%U</kbd> in <a href="#fmtstrings">log
  5240.       formats</a> for "Unix time" (seconds since 1970).
  5241.       <br>Won't overwrite old cache files.
  5242.       <br>Now works properly on SunOS 4.
  5243.       <br>Fix for occasional crashes on Windows.
  5244.       <br>Checks language files are not too long.
  5245.       <br>"Last seven days" data now calculated more accurately and
  5246.       displayed more clearly.
  5247.       <br>Computer-readable output now reports <kbd>SORTBY</kbd>'s as well as
  5248.       floors.
  5249.       <br>Revised Makefile will work with older make's.
  5250.       <br>Corrected Catalan language files.
  5251.       <br>Includes form interfaces in French and Japanese.
  5252.       <br><kbd>LOGFORMAT</kbd> documentation now includes the
  5253.       <a href="#fmtexamples"><kbd>LOGFORMAT</kbd> commands</a> for
  5254.       all built-in log formats.
  5255.   <dt><b><a name="new32">3.2</a></b> (04-May-99)
  5256.   <dd>Bug fixes: in particular <kbd>REFLINKINCLUDE pages</kbd> now works;
  5257.       and cache files now include all items even if they're not wanted for the
  5258.       main report.
  5259.       <br>Lines without a particular item now work properly with
  5260.       <kbd>INCLUDE</kbd> and <kbd>EXCLUDE</kbd> commands. This can cause
  5261.       <a href="#up311">differences in results</a> from previous
  5262.       versions.
  5263.       <br>New version of form interface to work round bug in Microsoft
  5264.       Internet Information Server.
  5265.       <br>New command <kbd><a href="#NOROBOTS">NOROBOTS</a></kbd>.
  5266.       <br>Backslashes are now coerced to forward slashes in filenames and
  5267.       usernames. While not always correct technically, it usually is in
  5268.       practice, and it makes them behave correctly in other parts of the
  5269.       program.
  5270.       <br>Usernames are now treated as case insensitive. Let me know if this
  5271.       causes a problem on any system.
  5272.       <br>Computer-readable output style now reports floors.
  5273.       <br>Rewritten Unix Makefile, and VMS build script. Let me know of any
  5274.       compilation problems.
  5275.       <br>New languages: Catalan, Icelandic, Japanese, Korean, Latvian,
  5276.       Lithuanian. Corrected Spanish language files and French domains file.
  5277.       <br><kbd>LANGUAGE</kbd> now selects local domains file automatically,
  5278.       where available.
  5279.       <br>Removed support for NetPresenz logs. The reasons are in the section
  5280.       on <a href="#up311">how to upgrade</a>.
  5281.       <br><a href="#form">Form interface documentation</a> rewritten;
  5282.       <a href="#faq">FAQ</a> broken into sections; sections on
  5283.       <a href="#logfile">logfiles</a> and <a href="#logfmt">log
  5284.       formats</a> separated and rewritten; new section on
  5285.       <a href="#helpers">helper applications</a>; and dozens of other
  5286.       improvements to the documentation.
  5287.   <dt><b><a name="new311">3.11</a></b> (26-Nov-98)
  5288.   <dd>Bug fix version.
  5289.       <br>Microsoft's attempt at W3 extended format is now understood even if
  5290.       there is a second <tt>#Fields:</tt> line in the logfile.
  5291.       <br>There is also a fix for a new Microsoft bug which results in an
  5292.       non-standard common format.
  5293.       <br>Intermittent crashes under Windows fixed.
  5294.       <br>Mailing lists announced.
  5295.   <dt><b><a name="new31">3.1</a></b> (17-Oct-98)
  5296.   <dd>Understands Microsoft's attempt at W3 extended format.
  5297.       <br>Several bugs fixed, including one that caused occasional
  5298.       crashes and one that caused the output to grow and grow.
  5299.       <br>Form interface works on Windows.
  5300.       <br>Allows aliases with two or more *'s on left hand side, if
  5301.       right hand side contains no *'s.
  5302.       <br>Aliases work properly with <kbd>CASE INSENSITIVE</kbd>.
  5303.       <br>Numerical <kbd>SUBDOMAIN</kbd>s fixed.
  5304.       <br>Understands more WebSTAR and Netscape tokens.
  5305.       <br>Accents in domains file work.
  5306.       <br><kbd>LOGFORMAT</kbd> removed from form interface as security
  5307.       risk.
  5308.       <br>Several warning messages improved.
  5309.       <br>Report aliases and in/exclusions shown in <kbd>settings</kbd>
  5310.       output.
  5311.       <br>Character set declared at top of output.
  5312.       <br>Spanish, Dutch, Norwegian (Bokmål and Nynorsk), Finnish,
  5313.       Turkish, Greek, Polish, Russian & Chinese language files included.
  5314.   <dt><b><a name="new30">3.0</a></b> (15-Jun-98)
  5315.   <dd>Corrected W3 extended format.
  5316.       <br>Fix for broken <kbd>strcmp()</kbd> function on SunOS 5.
  5317.       <br>Portuguese, Brazilian Portuguese, Danish and Hungarian language
  5318.       files included.
  5319.       <br>Precompiled executable for OS/2 available.
  5320.   <dt><b><a name="new291b1">2.91beta1</a></b> (04-Jun-98)
  5321.   <dd>Form interface included.
  5322.       <br>Uses less memory when compiling reports.
  5323.       <br>New operating system, BS2000/OSD, and code for EBCDIC character set.
  5324.       <br>New command
  5325.       <kbd><a href="#DEFAULTLOGFORMAT">DEFAULTLOGFORMAT</a></kbd>.
  5326.       <br><kbd><a href="#LASTSEVEN">LASTSEVEN</a></kbd> and
  5327.       <kbd><a href="#BASEURL">BASEURL</a></kbd> reinstated.
  5328.       <br>More information added to <kbd>PRINTVARS</kbd> output.
  5329.       <br>AppleScript support for Unix-style command lines added to Mac
  5330.       version.
  5331.       <br>Now works on SunOS 4, and other small bug fixes.
  5332.       <br>French, German, Swedish, Czech, Slovak, Slovene and Romanian
  5333.       language files included.
  5334.       <br>One page version of the Readme included in the documentation.
  5335.   <dt><b><a name="new290b4">2.90beta4</a></b> (09-Apr-98)
  5336.   <dd>Mended DNS cache file reading, which I broke in yesterday's release.
  5337.   <dt><b><a name="new290b3">2.90beta3</a></b> (08-Apr-98)
  5338.   <dd>Fixed bug that caused a crash while giving warning messages on SunOS;
  5339.       bug that caused configuration files that called other configuration
  5340.       files not to be completed; and other smaller bugs.
  5341.       <br>Italian language files included.
  5342.   <dt><b><a name="new290b2">2.90beta2</a></b> (03-Apr-98)
  5343.   <dd>Separate <kbd>LOGFORMAT</kbd>s for North American and international
  5344.       date formats, when using Microsoft or Netpresenz logs.
  5345.       <br>Understands the AppleShare IP server's attempt at the WebSTAR format.
  5346.       <br>Directory report now works properly even if you use the second
  5347.       argument to the <kbd><a href="#secondarg">LOGFILE</a></kbd>
  5348.       command.
  5349.       <br>Wild cards in filenames work properly on the Mac.
  5350.       <br>Other small bug fixes.
  5351.       <br>One speed improvement (I gain about 3%).
  5352.       <br>Several corrections and clarifications to the documentation.
  5353.   <dt><b><a name="new290b1">2.90beta1</a></b> (27-Mar-98)
  5354.   <dd>This version is a completely rewritten version. Every single line of
  5355.       code is new. The whole code is shorter despite considerable improvements
  5356.       in functionality. Several people have reported that it is significantly
  5357.       faster. The most important new features are:
  5358.       <ul>
  5359.     <li>Eleven new reports (Quarter-Hour, Five-Minute, Redirection,
  5360.         Failure, File Size, Referring Site, Redirected Referrer, Failed
  5361.         Referrer, Virtual Host, User, User Failure).
  5362.     <li>Reads logfiles in user-customisable format.
  5363.     <li>Analyses user and virtual host data, and failed requests.
  5364.     <li>Hierarchical reports list subdirectories under directories, and
  5365.         allow analysis of browser version numbers.
  5366.     <li>Faster sorting of long reports.
  5367.     <li>Floor and sort method made independent.
  5368.     <li>"Last date" column in reports, and can floor and sort by
  5369.         date.
  5370.     <li>Busiest time period at bottom of time reports.
  5371.     <li>"Not listed" line at bottom of other report.
  5372.     <li>Knows HTTP/1.1 status codes.
  5373.     <li>General Summary can go anywhere in the report.
  5374.     <li>General Summary and "Go To"s can now be turned on and
  5375.         off independently.
  5376.     <li>Status Code Report can be sorted in different ways.
  5377.     <li><a href="#TIMEOFFSET">Time offset</a> commands.
  5378.     <li>Much better checking of invalid configuration options and invalid
  5379.         logfile lines.
  5380.     <li>Only reads logfiles it might need.
  5381.     <li>Improvements in DNS functionality: can now read the DNS file
  5382.         without further lookups: also, separate recheck intervals for
  5383.         successful and failed lookups.
  5384.     <li>Hash sizes now chosen automatically.
  5385.     <li>More flexible language support.
  5386.     <li>Mac version reads gzipped logfiles.
  5387.     <li>Mac version supports drag-and-drop onto program icon.
  5388.     <li>Readme files completely re-written. Broken into lots of files,
  5389.         and new sections on <cite><a href="#start">Starting to use
  5390.         analog</a></cite> and <cite><a href="#meaning">What the
  5391.         results mean</a></cite>, as well as an
  5392.         <a href="#indx">index</a>.
  5393.       </ul>
  5394.       <a name="abolished290b1">The following features</a> have been abolished.
  5395.       <ul>
  5396.     <li>No Error Report. The error log was always intended for humans
  5397.         rather than computers to read. Moreover, its format varied from
  5398.         server to server, and even between different versions of the same
  5399.         server. The place of the Error Report has largely been taken by
  5400.         the new reports, particularly the Failure Report.
  5401.     <li>The approximate host counting has been abolished for the time
  5402.         being. I can put it back if there is a significant demand for it.
  5403.     <li>Only one <kbd>*</kbd> can now appear on the left-hand side of
  5404.         aliases. This is to avoid ambiguities.
  5405.     <li>For changes in the names and syntax of configuration options and
  5406.         command line arguments, see the section about
  5407.         <a href="#update">upgrading</a>.
  5408.       </ul>
  5409.       The following features are not yet present, but will be added by
  5410.       version 3.
  5411.       <ul>
  5412.     <li>The form interface.
  5413.     <li>Most of the languages.
  5414.       </ul>
  5415.   <dt><b><a href="#wasnew2">What was new in version 2?</a></b>
  5416.   <dt><b><a href="#wasnew1">What was new in version 1?</a></b>
  5417. </dl>
  5418.  
  5419. <hr>
  5420. <hr>
  5421. <a name="wasnew2"><h2>What was new in version 2?</h2>
  5422. </a>
  5423. This section lists the new features which were in version 2 of analog.
  5424.  
  5425. <dl>
  5426.   <dt><b><a href="#whatsnew">What's new in version 4?</a></b>
  5427.   <dt><b><a href="#wasnew3">What was new in version 3?</a></b>
  5428.   <dt><b>2.11</b> (14-Mar-97)
  5429.   <dd>Minor bug fixes to yesterday's release.
  5430.   <dt><b>2.1</b> (13-Mar-97)
  5431.   <dd>Language support rewritten, causing reduction in code size of 2200 lines.
  5432.       <br>New configuration command <kbd>LANGFILE</kbd>.
  5433.       <br>New Acorn RiscOS version.
  5434.       <br>Page requests per day reported.
  5435.       <br>Bug fix: <kbd>CASE INSENSITIVE</kbd> could cause <kbd>%7E</kbd>-type
  5436.       conversions not to take place.
  5437.   <dt><b>2.0.2</b> (04-Mar-97)
  5438.   <dd>DNS lookups and wildcards should now work in the Win32 version.
  5439.       <br>New configuration command <kbd>PRINTVARS</kbd>.
  5440.       <br>Fix for zero length hostnames after DNS lookups.
  5441.       <br>Minor corrections in French and Spanish translations.
  5442.   <dt><b>2.0</b> (10-Feb-97)
  5443.   <dd>New native Win32 version.
  5444.       <br>Wildcards allowed in filenames on Mac.
  5445.       <br>Ignores browser "-".
  5446.   <dt><b>1.93beta</b> (18-Jan-97)
  5447.   <dd>New commands <kbd>BROWALIAS</kbd>, <kbd>CONFIGFILE</kbd> and
  5448.       <kbd>PROGRESSFREQ</kbd>.
  5449.       <br>Form program can now call configuration files.
  5450.       <br>Form program now uses the default choices if none specified.
  5451.       <br>Domain report prints correctly in preformatted output.
  5452.       <br>Specifying +1 and +V2 doesn't crash the program.
  5453.       <br>-v reports dates correctly.
  5454.       <br>Trailing dots on hostnames removed.
  5455.       <br>Second argument to <kbd>LOGFILE</kbd> command can't be obliterated
  5456.       by <kbd>/../</kbd>
  5457.   <dt><b>1.92beta</b> (08-Oct-96)
  5458.   <dd>DNS lookups added on Mac.
  5459.       <br>Netpresenz format understood on Mac.
  5460.       <br>New languages: Spanish, Italian and Danish.
  5461.       <br>Extra information when debugging turned on.
  5462.       <br><code>*.htm</code> are now pages on all machines.
  5463.       <br>A few small bugs fixed.
  5464.   <dt><b>1.91beta4</b> (13-Jul-96)
  5465.   <dd>Cache file now includes page request information.
  5466.       <br>DNS bug fixed.
  5467.       <br>New command <kbd>DNSHASHSIZE</kbd>.
  5468.       <br>Bug in browser reports fixed.
  5469.   <dt><b>1.91beta3</b> (09-Jul-96)
  5470.   <dd>BSD/OS compilation bug believed fixed.
  5471.       <br>Fixed <kbd>HOSTALIAS</kbd> which I broke yesterday.
  5472.       <br>DNS bug (causing too many lookups) identified,
  5473.       although not yet fixed.
  5474.   <dt><b>1.91beta2</b> (08-Jul-96)
  5475.   <dd>Some bug fixes (including: <kbd>HOSTEXCLUDE</kbd> and <kbd>CASE
  5476.       INSENSITIVE</kbd> didn't work properly; selecting "no links"
  5477.       failed on the form; less fussy about what can appear on the form).
  5478.       <br>Mac version no longer includes source code, so is much shorter.
  5479.   <dt><b>1.91beta1</b> (05-Jul-96)
  5480.   <dd>Now DNS code doesn't look up a name twice, even if one is a failed
  5481.       request.
  5482.   <dt><b>1.91beta</b> (05-Jul-96)
  5483.   <dd>Will now output in any of several languages.
  5484.       <br>Preformatted output introduced.
  5485.       <br>New File Type Report.
  5486.       <br>Can limit the number of rows in the time reports.
  5487.       <br>Number of requests for pages (as opposed to raw requests) now
  5488.       calculated throughout.
  5489.       <br>DNS lookup returns, with cacheing across runs.
  5490.       <br>Logfiles can include wildcards.
  5491.       <br>Wildcards can include multiple *'s.
  5492.       <br>Can process case insensitive logfiles.
  5493.       <br><kbd>OUTPUTALIAS</kbd> commands introduced.
  5494.       <br>New commands to specify exactly what is included, and what linked, in
  5495.       the request report and referrer report.
  5496.       <br><tt>FILEALIAS a a</tt> and <tt>FILEALIAS a b; FILEALIAS b c</tt>
  5497.       now work.
  5498.       <br>New <kbd>ALLOW</kbd> options to cancel <kbd>INCLUDES</kbd>.
  5499.       <br><kbd>REPSEPCHAR</kbd> and <kbd>DECPOINT</kbd> introduced.
  5500.       <br><kbd>DIRSUFFIX</kbd> introduced.
  5501.       <br>Debugging reports number of corrupt lines in other logs.
  5502.       <br>Hash sizes can now be allocated at run time.
  5503.       <br>stdin can now be used for any input file, but not for two.
  5504.       <br>Macintosh version now quits automatically if no warnings have been
  5505.       issued.
  5506.       <br>Form interface made more secure.
  5507.       <br>"Mozilla (compatible)" separated out in Browser Summary.
  5508.       <br>Major internal changes should improve speed.
  5509.       <br>Code for non-Unix platforms integrated into main code.
  5510.       <br>"Referrer" spelled correctly.
  5511.       <br>Licence introduced.
  5512.       <br>Update file introduced.
  5513.       <br>Readme updated to include non-Unix instructions.
  5514.   <dt><b>(19-Apr-96)</b>
  5515.   <dd>First Mac version.
  5516.   <dt><b>1.9beta6</b>
  5517.   <dd>Two bug fixes (number of bytes was incorrectly reported in some cases,
  5518.       and <kbd>-v</kbd> would overwrite the <kbd>OUTFILE</kbd>).
  5519.       <br>Documentation improved.
  5520.   <dt><b>1.9beta5</b>
  5521.   <dd>More bug fixes...
  5522.   <dt><b>1.9beta4</b>
  5523.   <dd>One important bug fix (I broke <kbd>GRAPHICAL OFF</kbd> in 1.9beta3).
  5524.       <br>New form cgi options: <kbd>ch</kbd>, <kbd>gr</kbd> and
  5525.       <kbd>ou=3</kbd>.
  5526.       <br>Code shortened.
  5527.   <dt><b>(05-Mar-96)</b>
  5528.   <dd>First DOS version.
  5529.   <dt><b>1.9beta3</b>
  5530.   <dd>Mainly bug fixes and improved documentation.
  5531.       <br>Browser and referer reports now include failed requests.
  5532.       <br>The <kbd>WARNINGS</kbd> option can now be specified on the form.
  5533.   <dt><b>1.9beta2</b>
  5534.   <dd>Small bug fixes
  5535.   <dt><b>1.9beta</b> (06-Feb-96)
  5536.   <dd>Lots of changes. The most important new features are
  5537.       <ul>
  5538.     <li>Six new reports (hourly report, browser report, browser summary,
  5539.         referer report, status code report and error report).
  5540.     <li>Analysis of NCSA/Apache referer log, agent log and combined log
  5541.         formats.
  5542.     <li>Graphical time reports that still work on text-based browsers.
  5543.     <li>Configurable columns in the time reports.
  5544.     <li>Time reports can run backwards.
  5545.     <li>Time graphs can be plotted by bytes instead of by requests.
  5546.     <li>Can cache old data so that old logfiles need not be kept.
  5547.     <li>Can process several logfiles.
  5548.     <li>Can combine logfiles from several different hosts.
  5549.     <li>Will uncompress compressed logfiles.
  5550.     <li>All configuration options can now be specified on the commandline.
  5551.     <li>Mandatory configuration file added.
  5552.     <li>Lots of new options in the form processing program.
  5553.     <li>Wildcards greatly improved throughout.
  5554.     <li>Alphabetical host report right-aligned.
  5555.     <li>Bytes now quoted as MBytes etc. instead of long number.
  5556.     <li>Produces HTML2.0 compliant output.
  5557.     <li>New sort method <kbd>RANDOM</kbd> (saves time for long reports).
  5558.     <li>Floors for reports now work properly.
  5559.     <li>Can now specify a report <kbd>FROM</kbd> 100 or more days ago.
  5560.     <li>Option to turn off warnings.
  5561.     <li>Considerable savings in code length over previous versions.
  5562.       </ul>
  5563.   <dt><b><a href="#wasnew1">What was new in version 1?</a></b>
  5564. </dl>
  5565.  
  5566. <hr>
  5567. <hr>
  5568. <a name="wasnew1"><h2>What was new in version 1?</h2>
  5569. </a>
  5570. This section lists the new features which were in version 1 of analog.
  5571.  
  5572. <dl>
  5573.   <dt><b><a href="#whatsnew">What's new in version 4?</a></b>
  5574.   <dt><b><a href="#wasnew3">What was new in version 3?</a></b>
  5575.   <dt><b><a href="#wasnew2">What was new in version 2?</a></b>
  5576.   <dt><b>1.2.6</b>
  5577.   <dd>Minor bug fix; will only affect those with corrupt logfiles.
  5578.   <dt><b>1.2.5</b>
  5579.   <dd>Minor bug fix for weekly report.
  5580.   <dt><b>1.2.4</b>
  5581.   <dd>Patch for Spyglass server logfile format.
  5582.   <dt><b>1.2.3</b>
  5583.   <dd>A couple of bug fixes (wild subdomains sometimes caused crashes).
  5584.       <br><kbd>-v</kbd> option now gives the version number.
  5585.   <dt><b>1.2.2</b>
  5586.   <dd>Patch for proxy servers: <kbd>http://</kbd> not translated to
  5587.       <kbd>http:/</kbd>
  5588.   <dt><b>1.2</b> (11-Nov-95)
  5589.   <dd>Can configure columns in reports to give percentage requests and number
  5590.       of bytes.
  5591.       <br>Wild subdomains (e.g., *.com).
  5592.       <br>Nameless subdomains.
  5593.       <br>Subdomains now listed in alphabetical order.
  5594.       <br>Proper support for numerical hostnames in <kbd>HOSTIGNORE</kbd>,
  5595.       <kbd>HOSTONLY</kbd>, <kbd>SUBDOMAIN</kbd> and alphabetical sorting.
  5596.       <br>New <kbd>BASEURL</kbd> command allowing statistics to be
  5597.       displayed on other servers.
  5598.       <br>Output always says how things are sorted.
  5599.       <br>"Last 7 days" now behaves sensibly with <kbd>TO</kbd>.
  5600.       <br>Filenames containing <kbd>/../</kbd>, <kbd>/./</kbd> and
  5601.       <kbd>//</kbd> translated.
  5602.       <br>Header and footer options removed from form (for security reasons).
  5603.   <dt><b>1.1</b> (02-Oct-95)
  5604.   <dd>Form interface introduced.
  5605.       <br>ASCII output now possible as well as HTML.
  5606.       <br>Output file can now be specified in the configuration file.
  5607.       <br><kbd>FROM</kbd> and <kbd>TO</kbd> commands more powerful.
  5608.       <br><kbd>DEBUG</kbd> and <kbd>BACKGROUND</kbd> introduced.
  5609.       <br>One bug fix: alphabetical sorting doesn't now swap some hostnames.
  5610.       <br>List of primes included in distribution.
  5611.   <dt><b>1.0</b> (12-Sep-95)
  5612.   <dd>Only minor changes since 0.94beta.
  5613.   <dt><b>0.94beta</b> (30-Aug-95)
  5614.   <dd>New configuration variables <kbd>SEPCHAR</kbd> and
  5615.       <kbd>REPORTORDER</kbd>.
  5616.       <br>New configuration commands <kbd>WITHARGS</kbd> and
  5617.       <kbd>WITHOUTARGS</kbd>.
  5618.       <br>New commandline options <kbd>+-A</kbd> and <kbd>+-x</kbd>.
  5619.       (Config.: <kbd>ALL</kbd> and <kbd>GENERAL</kbd>).
  5620.       <br>Logfile entries with - as the return code are now regarded
  5621.       as successes, not corrupt entries.
  5622.       <br>Fixed bugs in host report when aliases or numerical hosts are
  5623.       present.
  5624.       <br>Documentation rewritten.
  5625.   <dt><b>0.93beta</b> (27-Jul-95)
  5626.   <dd>Approximate hostname counting now possible in fixed memory.
  5627.       <br>New configuration commands <kbd>ISPAGE</kbd> and
  5628.       <kbd>ISNOTPAGE</kbd>.
  5629.       <br>New commandline option <kbd>-v</kbd>.
  5630.       <br>New configuration command <kbd>WEEKBEGINSON</kbd>.
  5631.       <br>Proper error message when memory exceeded.
  5632.       <br>Program split into several files.
  5633.   <dt><b>0.92beta</b> (11-Jul-95)
  5634.   <dd>New reports introduced: hostname, full daily, and weekly.
  5635.       <br><kbd>FROM</kbd> and <kbd>TO</kbd> commands introduced.
  5636.       <br>Header and footer files introduced.
  5637.       <br>More helpful warning messages.
  5638.       <br>Ability to read configuration instructions from stdin.
  5639.       <br>Subdomain commands moved from domains file to configuration file.
  5640.       <br>Makefile provided.
  5641.   <dt><b>0.91beta</b> (04-Jul-95)
  5642.   <dd>Configuration file introduced, enabling many new options.
  5643.       <br>Some bug fixes and speed improvements.
  5644.       <br>Ability to print "top n" reports (rather than
  5645.       "everything higher than n").
  5646.       <br>Request report can print only pages.
  5647.       <br>Ability to try and resolve numerical addresses.
  5648.       <br>Now less fussy about the format of the domains file.
  5649.       <br>Logo added.
  5650.       <br>Readme converted to HTML.
  5651.   <dt><b>0.9beta</b>
  5652.   <dd>More speed improvements, and some bug fixes.
  5653.       <br>Introduced <kbd>-u</kbd> option.
  5654.       <br>Introduced subdomain analysis.
  5655.       <br>Included "not modified" replies as successes, not
  5656.       redirects.
  5657.       <br>First public release at 0.9beta3. (29-Jun-95)
  5658.   <dt><b>0.89beta</b> (21-Jun-95)
  5659.   <dd>Commandline arguments.
  5660.       <br>Efficiency improvements.
  5661.       <br>Host count and "last 7 day" statistics.
  5662.   <dt><b>0.8beta</b> (14-Jun-95)
  5663.   <dd>Initial program, just default options.
  5664. </dl>
  5665.  
  5666. <hr>
  5667. <hr>
  5668. <a name="quickref"><h2>Quick reference</h2>
  5669. </a>
  5670. This section is list of all of analog's configuration commands, together with a
  5671. quick reference to their syntax and some examples. It's designed for those who
  5672. are already familiar with the program, so it's pretty useless for trying to
  5673. learn the program: to learn about the commands, read the section on 
  5674. <cite><a href="#custom">Customising analog</a></cite> instead, or consult
  5675. the <a href="#indx">index</a> for a reference. I would
  5676. <a href="#mailing">welcome feedback</a> on this new section.
  5677.  
  5678. <p>
  5679. This section is divided into the following parts:
  5680. <ul>
  5681.   <li><a href="#quicknot">Notation</a>
  5682.   <li><a href="#quickfiles">Input and output files</a>
  5683.   <li><a href="#quickfmt"><kbd>LOGFORMAT</kbd> commands</a>
  5684.   <li><a href="#quickalias"><kbd>ALIAS</kbd> commands</a>
  5685.   <li><a href="#quickinclude"><kbd>INCLUDE/EXCLUDE</kbd> commands</a>
  5686.   <li><a href="#quickdns">DNS commands</a>
  5687.   <li><a href="#quicksub">Sub-item commands</a>
  5688.   <li><a href="#quicklowmem"><kbd>LOWMEM</kbd> commands</a>
  5689.   <li><a href="#quickrep">Report commands</a>
  5690.   <li><a href="#quickgraph"><kbd>GRAPH</kbd> commands</a>
  5691.   <li><a href="#quickback"><kbd>BACK</kbd> commands</a>
  5692.   <li><a href="#quickrows"><kbd>ROWS</kbd> commands</a>
  5693.   <li><a href="#quickcols"><kbd>COLS</kbd> commands</a>
  5694.   <li><a href="#quicksortby"><kbd>SORTBY</kbd> commands</a>
  5695.   <li><a href="#quickfloor"><kbd>FLOOR</kbd> commands</a>
  5696.   <li><a href="#quicklinks">Hyperlinks</a>
  5697.   <li><a href="#quicklang">Language commands</a>
  5698.   <li><a href="#quickcosmetic">Cosmetic and miscellaneous commands</a>
  5699.   <li><a href="#quickdebug">Diagnostics</a>
  5700. </ul>
  5701.  
  5702. <h3><a name="quicknot">Notation</a></h3>
  5703. The syntax for each command is given using the following notation.
  5704. <pre>
  5705. "stuff"        the word stuff
  5706. x y            x followed by y
  5707. (x | y)        x or y
  5708. [x]            optional x
  5709. subset("...")  any letters from the string, in any order
  5710. perm("...")    all the letters from the string, in any order
  5711. *x             x may contain wildcards * and ? (and often comma-separated list)
  5712. x := y         x is defined to be y
  5713. COMMAND        the command under discussion
  5714. </pre>
  5715. In addition, I use the following names for different types of argument.
  5716. <pre>
  5717. char           a single character
  5718. string         a string
  5719. digit          a digit
  5720. number         a non-negative integer (i.e. a string of digits)
  5721. real           a non-negative real number
  5722. regexp         a POSIX extended regular expression
  5723. file           a filename within your server's filespace;
  5724.                    e.g. /index.html
  5725. localfile      a filename within your system's filespace;
  5726.                    e.g. /usr/local/analog.html
  5727. localfmtfile   as localfile, but may contain <a href="#OUTFILE">date codes</a>;
  5728.                    e.g. /usr/local/analog%y%M.html
  5729. referrer       a URL of a referring page;
  5730.                    e.g. http://search.yahoo.com/
  5731. URL            a URL which may be absolute, or relative to the output page;
  5732.                    e.g. images/ or /~fred/images/
  5733.                       or http://www.fred.com/images/
  5734. </pre>
  5735.  
  5736. <p>Note: I have occasionally opted for clarity above strict accuracy where I
  5737. don't think it will cause any confusion!
  5738.  
  5739. <p>The syntax for commands in general was given
  5740. <a href="#syntax">earlier</a>: remember that an argument which contains a
  5741. hash or a space must be put in quotes or parentheses.
  5742.  
  5743. <h3><a name="quickfiles">Input and output files</a></h3>
  5744.  
  5745. <dl>
  5746. <dt><i>Syntax</i>
  5747. <dd><kbd>
  5748. <a href="#logfile">LOGFILE</a> (*localfile | "-" | "none") [prefix_string]
  5749. <br><a href="#OUTFILE">OUTFILE</a> (localfmtfile | "-" | "none")
  5750. <br><a href="#cache">CACHEFILE</a> (*localfile | "-" | "none")
  5751. <br><a href="#cache">CACHEOUTFILE</a> (localfmtfile | "-" | "none")
  5752. <br><a href="#UNCOMPRESS">UNCOMPRESS</a> *localfile program
  5753. </kbd>
  5754. <dt><i>Examples</i>
  5755. <dd><kbd>
  5756. LOGFILE /httpd/logs/*
  5757. <br>LOGFILE c:\logs\log1,c:\logs\log2
  5758. <br>OUTFILE "Hard Disk:Report%Y%M.html"
  5759. <br>UNCOMPRESS *.gz "/usr/bin/gzip -cd"</kbd>
  5760. </dl>
  5761.     
  5762. <h3><a name="quickfmt"><kbd>LOGFORMAT</kbd> commands</a></h3>
  5763.  
  5764. <dl>
  5765. <dt><i>Syntax</i>
  5766. <dd><pre>
  5767. format_string := (<a href="#fmtstrings">see documentation</a>)
  5768. Apache_format_string := (see <a href="http://www.apache.org/docs/mod/mod_log_config.html">Apache documentation</a>)
  5769. logformat := ("COMMON" | "COMBINED" | "REFERRER" | "BROWSER" | "EXTENDED" |
  5770.               "MICROSOFT-NA" | "MICROSOFT-INT" | "WEBSITE-NA" | "WEBSITE-INT" |
  5771.               "MS-EXTENDED" | "MS-COMMON" | "NETSCAPE" | "WEBSTAR" | "AUTO" |
  5772.               format_string)
  5773. <a href="#logfmt">LOGFORMAT</a> logformat
  5774. <a href="#DEFAULTLOGFORMAT">DEFAULTLOGFORMAT</a> logformat
  5775. <a href="#Apache">APACHELOGFORMAT</a> Apache_format_string
  5776. <a href="#DEFAULTLOGFORMAT">APACHEDEFAULTLOGFORMAT</a> Apache_format_string
  5777. </pre>
  5778.  
  5779. <dt><i>Notes</i>
  5780. <dd><kbd>LOGFORMAT</kbd> and <kbd>APACHELOGFORMAT</kbd> only affect logfiles
  5781.     occurring later in the same configuration file.
  5782.  
  5783. <dt><i>Examples</i>
  5784. <dd><kbd>
  5785. LOGFORMAT (%S - %u [%d/%M/%Y:%h:%n:%j %j] "%j %r %j" %c %b)
  5786. <br>DEFAULTLOGFORMAT MS-EXTENDED
  5787. <br>APACHELOGFORMAT (%h %l %u %t \"%r\" %s %b)</kbd>
  5788. </dl>
  5789.  
  5790.  
  5791. <h3><a name="quickalias"><kbd>ALIAS</kbd> commands</a></h3>
  5792.  
  5793. <dl>
  5794. <dt><i>1. Commands (items)</i>
  5795. <dd><kbd>
  5796. <a href="#useraliases">FILEALIAS</a>,
  5797. <a href="#useraliases">HOSTALIAS</a>,
  5798. <a href="#useraliases">BROWALIAS</a>,
  5799. <a href="#useraliases">REFALIAS</a>,
  5800. <a href="#useraliases">USERALIAS</a>,
  5801. <a href="#useraliases">VHOSTALIAS</a></kbd>
  5802.  
  5803. <dt><i>Syntax</i>
  5804. <dd><kbd>
  5805. COMMAND *olditem newitem
  5806. <br>COMMAND ("REGEXP:" | "REGEXPI:")regexp newitem</kbd>
  5807.  
  5808. <dt><i>Notes</i>
  5809. <dd>Aliases item in all reports. Items with the same resultant name are
  5810.     combined. <kbd>newitem</kbd> may contain <kbd>$1</kbd>, <kbd>$2</kbd>
  5811.     etc., representing the <kbd>*</kbd>'s in <kbd>olditem</kbd> or the
  5812.     bracketed subexpressions in <kbd>regexp</kbd>. Regular expressions are only
  5813.     available on some platforms.
  5814.  
  5815. <dt><i>Examples</i>
  5816. <dd><kbd>FILEALIAS /*/football/* /$1/soccer/$2</kbd>
  5817. <dd><kbd>USERALIAS REGEXP:^([^U].*) U$1</kbd>
  5818.     
  5819. <p><dt><i>2. Commands (reports)</i>
  5820. <dd><kbd>
  5821. <a href="#OUTPUTALIAS">TYPEOUTPUTALIAS</a>,
  5822. <a href="#OUTPUTALIAS">HOSTOUTPUTALIAS</a>,
  5823. <a href="#OUTPUTALIAS">REQOUTPUTALIAS</a>,
  5824. <a href="#OUTPUTALIAS">REDIROUTPUTALIAS</a>,
  5825. <a href="#OUTPUTALIAS">FAILOUTPUTALIAS</a>,
  5826. <a href="#OUTPUTALIAS">DIROUTPUTALIAS</a>,
  5827. <a href="#OUTPUTALIAS">DOMOUTPUTALIAS</a>,
  5828. <a href="#OUTPUTALIAS">ORGOUTPUTALIAS</a>,
  5829. <a href="#OUTPUTALIAS">REFOUTPUTALIAS</a>,
  5830. <a href="#OUTPUTALIAS">REFSITEOUTPUTALIAS</a>,
  5831. <a href="#OUTPUTALIAS">REDIRREFOUTPUTALIAS</a>,
  5832. <a href="#OUTPUTALIAS">FAILREFOUTPUTALIAS</a>,
  5833. <a href="#OUTPUTALIAS">BROWOUTPUTALIAS</a>,
  5834. <a href="#OUTPUTALIAS">FULLBROWOUTPUTALIAS</a>,
  5835. <a href="#OUTPUTALIAS">OSOUTPUTALIAS</a>,
  5836. <a href="#OUTPUTALIAS">VHOSTOUTPUTALIAS</a>,
  5837. <a href="#OUTPUTALIAS">USEROUTPUTALIAS</a>,
  5838. <a href="#OUTPUTALIAS">FAILUSEROUTPUTALIAS</a></kbd>
  5839.     
  5840. <dt><i>Syntax</i>
  5841. <dd><kbd>
  5842. COMMAND *item string
  5843. <br>COMMAND ("REGEXP:" | "REGEXPI:")regexp string</kbd>
  5844.  
  5845. <dt><i>Notes</i>
  5846. <dd>Aliases item on one line of one report only. <kbd>string</kbd> may contain
  5847.     <kbd>$1</kbd>, <kbd>$2</kbd> etc., representing the <kbd>*</kbd>'s in
  5848.     <kbd>item</kbd> or the bracketed subexpressions in
  5849.     <kbd>regexp</kbd>. Regular expressions are only available on some
  5850.     platforms.
  5851.  
  5852. <dt><i>Examples</i>
  5853. <dd><kbd>REQOUTPUTALIAS /football/ "/football/ (Main football page)"</kbd>
  5854. <dd><kbd>REFOUTPUTALIAS REGEXP:^(http://([^/]*\.)?(maths|stats)\.uxy\.edu.*) ([$3] $1)</kbd>
  5855.     
  5856. <p><dt><i>3. Other commands: syntax</i>
  5857. <dd><kbd>
  5858. <a href="#CASE">CASE</a> ("SENSITIVE" | "INSENSITIVE")
  5859. <br><a href="#CASE">USERCASE</a> ("SENSITIVE" | "INSENSITIVE")
  5860. <br><a href="#SCC">SEARCHCHARCONVERT</a> ("ON" | "OFF")
  5861. <br><a href="#DIRSUFFIX">DIRSUFFIX</a> suffix
  5862. <br><a href="#TIMEOFFSET">LOGTIMEOFFSET</a> ["+" | "-"] number
  5863. <br><a href="#TIMEOFFSET">TIMEOFFSET</a> ["+" | "-"] number</kbd>
  5864. <dt><i>Examples</i>
  5865. <dd><kbd>
  5866. CASE SENSITIVE
  5867. <br>DIRSUFFIX index.htm
  5868. <br>LOGTIMEOFFSET -300
  5869. </kbd>
  5870. </dl>
  5871.  
  5872.  
  5873. <h3><a name="quickinclude"><kbd>INCLUDE/EXCLUDE</kbd> commands</a></h3>
  5874.  
  5875. <dl>
  5876. <dt><i>1. Commands (items)</i>
  5877. <dd><kbd>
  5878. <a href="#include">FILEINCLUDE</a>,
  5879. <a href="#include">FILEEXCLUDE</a>,
  5880. <a href="#include">HOSTINCLUDE</a>,
  5881. <a href="#include">HOSTEXCLUDE</a>,
  5882. <a href="#include">BROWINCLUDE</a>,
  5883. <a href="#include">BROWEXCLUDE</a>,
  5884. <a href="#include">REFINCLUDE</a>,
  5885. <a href="#include">REFEXCLUDE</a>,
  5886. <a href="#include">USERINCLUDE</a>,
  5887. <a href="#include">USEREXCLUDE</a>,
  5888. <a href="#include">VHOSTINCLUDE</a>,
  5889. <a href="#include">VHOSTEXCLUDE</a></kbd>
  5890.  
  5891. <dt><i>Syntax</i>
  5892. <dd><kbd>
  5893. COMMAND (*item | "")
  5894. <br>COMMAND ("REGEXP:" | "REGEXPI:")regexp</kbd>
  5895.  
  5896. <dt><i>Notes</i>
  5897. <dd>Excludes all logfile entries containing an excluded item from all reports.
  5898. Includes and excludes are done after aliases, so the <kbd>item</kbd> is the
  5899. aliased name, if applicable. Regular expressions are only available on some
  5900. platforms.
  5901.  
  5902. <dt><i>Examples</i>
  5903. <dd><kbd>
  5904. FILEINCLUDE /jim/*
  5905. <br>FILEINCLUDE REGEXP:^/~[^/]*/$
  5906. <br>HOSTEXCLUDE proxy*.aol.com
  5907. <br>USEREXCLUDE ""
  5908. </kbd>
  5909.     
  5910. <p><dt><i>2. Syntax (including and excluding dates)</i>
  5911. <dd><kbd>
  5912. partdate := ["+" | "-"] digit digit
  5913. <br>date :=  partdate partdate partdate [":" partdate partdate]
  5914. <br><a href="#FROMTO">FROM</a> date
  5915. <br><a href="#FROMTO">TO</a> date</kbd>
  5916. <dt><i>Examples</i>
  5917. <dd><kbd>
  5918. FROM 990719:1200
  5919. <br>TO -00-0101
  5920. </kbd>
  5921.     
  5922. <p><dt><i>3. Commands (reports)</i>
  5923. <dd><kbd>
  5924. <a href="#outputexcludes">REQINCLUDE</a>,
  5925. <a href="#outputexcludes">REQEXCLUDE</a>,
  5926. <a href="#outputexcludes">REDIRINCLUDE</a>,
  5927. <a href="#outputexcludes">REDIREXCLUDE</a>,
  5928. <a href="#outputexcludes">FAILINCLUDE</a>,
  5929. <a href="#outputexcludes">FAILEXCLUDE</a>,
  5930. <a href="#outputexcludes">TYPEINCLUDE</a>,
  5931. <a href="#outputexcludes">TYPEEXCLUDE</a>,
  5932. <a href="#outputexcludes">DIRINCLUDE</a>,
  5933. <a href="#outputexcludes">DIREXCLUDE</a>,
  5934. <a href="#outputexcludes">HOSTREPINCLUDE</a>,
  5935. <a href="#outputexcludes">HOSTREPEXCLUDE</a>,
  5936. <a href="#outputexcludes">DOMINCLUDE</a>,
  5937. <a href="#outputexcludes">DOMEXCLUDE</a>,
  5938. <a href="#outputexcludes">ORGINCLUDE</a>,
  5939. <a href="#outputexcludes">ORGEXCLUDE</a>,
  5940. <a href="#outputexcludes">REFREPINCLUDE</a>,
  5941. <a href="#outputexcludes">REFREPEXCLUDE</a>,
  5942. <a href="#outputexcludes">REFSITEINCLUDE</a>,
  5943. <a href="#outputexcludes">REFSITEEXCLUDE</a>,
  5944. <a href="#outputexcludes">SEARCHQUERYINCLUDE</a>,
  5945. <a href="#outputexcludes">SEARCHQUERYEXCLUDE</a>,
  5946. <a href="#outputexcludes">SEARCHWORDINCLUDE</a>,
  5947. <a href="#outputexcludes">SEARCHWORDEXCLUDE</a>,
  5948. <a href="#outputexcludes">REDIRREFINCLUDE</a>,
  5949. <a href="#outputexcludes">REDIRREFEXCLUDE</a>,
  5950. <a href="#outputexcludes">FAILREFINCLUDE</a>,
  5951. <a href="#outputexcludes">FAILREFEXCLUDE</a>,
  5952. <a href="#outputexcludes">BROWSUMINCLUDE</a>,
  5953. <a href="#outputexcludes">BROWSUMEXCLUDE</a>,
  5954. <a href="#outputexcludes">FULLBROWINCLUDE</a>,
  5955. <a href="#outputexcludes">FULLBROWEXCLUDE</a>,
  5956. <a href="#outputexcludes">OSINCLUDE</a>,
  5957. <a href="#outputexcludes">OSEXCLUDE</a>,
  5958. <a href="#outputexcludes">VHOSTREPINCLUDE</a>,
  5959. <a href="#outputexcludes">VHOSTREPEXCLUDE</a>,
  5960. <a href="#outputexcludes">USERREPINCLUDE</a>,
  5961. <a href="#outputexcludes">USERREPEXCLUDE</a>,
  5962. <a href="#outputexcludes">FAILUSERINCLUDE</a>,
  5963. <a href="#outputexcludes">FAILUSEREXCLUDE</a></kbd>
  5964.  
  5965. <dt><i>Syntax</i>
  5966. <dd><kbd>
  5967. COMMAND *item
  5968. <br>COMMAND ("REGEXP:" | "REGEXPI:")regexp</kbd>
  5969.  
  5970. <dt><i>Notes</i>
  5971. <dd>Excludes an excluded item from one report only. Regular expressions are
  5972. only available on some platforms.
  5973.  
  5974. <dt><i>Example</i>
  5975. <dd><kbd>REQINCLUDE pages</kbd>
  5976.  
  5977. <p><dt><i>4. Syntax (miscellaneous)</i>
  5978. <dd><kbd>
  5979. <a href="#PAGEINCLUDE">PAGEINCLUDE</a> *file
  5980. <br><a href="#PAGEINCLUDE">PAGEEXCLUDE</a> *file
  5981. <br><a href="#ARGSINCLUDE">ARGSINCLUDE</a> *file
  5982. <br><a href="#ARGSINCLUDE">ARGSEXCLUDE</a> *file
  5983. <br><a href="#ARGSINCLUDE">REFARGSINCLUDE</a> *referrer
  5984. <br><a href="#ARGSINCLUDE">REFARGSEXCLUDE</a> *referrer</kbd>
  5985. <dt><i>Notes</i>
  5986. <dd>These can be regular expressions too, on suitable platforms.
  5987. <dt><i>Example</i>
  5988. <dd><kbd>
  5989. PAGEINCLUDE *.asp
  5990. </kbd>
  5991. </dl>
  5992.  
  5993. <h3><a name="quickdns">DNS commands</a></h3>
  5994.  
  5995. <dl>
  5996.   <dt><i>Syntax</i>
  5997.   <dd><kbd>
  5998. <a href="#dns">DNSFILE</a> localfile
  5999. <br><a href="#dns">DNS</a> ("NONE" | "READ" | "LOOKUP" | "WRITE")
  6000. <br><a href="#dns">DNSLOCKFILE</a> localfile
  6001. <br><a href="#dns">DNSGOODHOURS</a> number
  6002. <br><a href="#dns">DNSBADHOURS</a> number</kbd>
  6003. <dt><i>Examples</i>
  6004. <dd><kbd>
  6005. DNSFILE dnscache.txt
  6006. <br>DNS WRITE
  6007. <br>DNSBADHOURS 48
  6008. </kbd>
  6009. </dl>
  6010.  
  6011. <h3><a name="quicksub">Sub-item commands</a></h3>
  6012.  
  6013. <dl>
  6014.   <dt><i>Syntax</i>
  6015.   <dd><kbd>
  6016. <a href="#hierreps">SUBDIR</a> *file
  6017. <br><a href="#hierreps">SUBDOMAIN</a> *subdomain
  6018. <br><a href="#hierreps">SUBORG</a> *subdomain
  6019. <br><a href="#hierreps">SUBTYPE</a> *extension
  6020. <br><a href="#hierreps">SUBBROW</a> *browser
  6021. <br><a href="#hierreps">REFDIR</a> *referrer</kbd>
  6022. <dt><i>Examples</i>
  6023. <dd><kbd>
  6024. SUBDIR /jim/*/*
  6025. <br>SUBTYPE *.gz
  6026. </kbd>
  6027. </dl>
  6028.  
  6029. <h3><a name="quicklowmem"><kbd>LOWMEM</kbd> commands</a></h3>
  6030.  
  6031. <dl>
  6032. <dt><i>Commands</i>
  6033. <dd><kbd><a href="#lowmem">FILELOWMEM</a>,
  6034. <a href="#lowmem">HOSTLOWMEM</a>,
  6035. <a href="#lowmem">BROWLOWMEM</a>,
  6036. <a href="#lowmem">REFLOWMEM</a>,
  6037. <a href="#lowmem">USERLOWMEM</a>,
  6038. <a href="#lowmem">VHOSTLOWMEM</a></kbd>
  6039. <dt><i>Syntax</i>
  6040. <dd><kbd>
  6041. COMMAND ("0" | "1" | "2" | "3")</kbd>
  6042. <dt><i>Example</i>
  6043. <dd><kbd>
  6044. HOSTLOWMEM 3
  6045. </kbd>
  6046. </dl>
  6047.  
  6048. <h3><a name="quickrep">Report commands</a></h3>
  6049.  
  6050. <dl>
  6051. <dt><i>Commands</i>
  6052. <dd><kbd><a href="#replist">GENERAL</a>,
  6053. <a href="#replist">ALL</a>,
  6054. <a href="#replist">MONTHLY</a>,
  6055. <a href="#replist">WEEKLY</a>,
  6056. <a href="#replist">FULLDAILY</a>,
  6057. <a href="#replist">DAILY</a>,
  6058. <a href="#replist">FULLHOURLY</a>,
  6059. <a href="#replist">HOURLY</a>,
  6060. <a href="#replist">QUARTER</a>,
  6061. <a href="#replist">FIVE</a>,
  6062. <a href="#replist">HOST</a>,
  6063. <a href="#replist">ORGANISATION</a>,
  6064. <a href="#replist">DOMAIN</a>,
  6065. <a href="#replist">REQUEST</a>,
  6066. <a href="#replist">DIRECTORY</a>,
  6067. <a href="#replist">FILETYPE</a>,
  6068. <a href="#replist">SIZE</a>,
  6069. <a href="#replist">PROCTIME</a>,
  6070. <a href="#replist">REDIR</a>,
  6071. <a href="#replist">FAILURE</a>,
  6072. <a href="#replist">REFERRER</a>,
  6073. <a href="#replist">REFSITE</a>,
  6074. <a href="#replist">SEARCHQUERY</a>,
  6075. <a href="#replist">SEARCHWORD</a>,
  6076. <a href="#replist">REDIRREF</a>,
  6077. <a href="#replist">FAILREF</a>,
  6078. <a href="#replist">FULLBROWSER</a>,
  6079. <a href="#replist">BROWSER</a>,
  6080. <a href="#replist">OSREP</a>,
  6081. <a href="#replist">VHOST</a>,
  6082. <a href="#replist">USER</a>,
  6083. <a href="#replist">FAILUSER</a>,
  6084. <a href="#replist">STATUS</a></kbd>
  6085.  
  6086. <dt><i>Syntax</i>
  6087. <dd><kbd>
  6088. REPORTCOMMAND ("ON" | "OFF")</kbd>
  6089. <dt><i>Examples</i>
  6090. <dd><kbd>
  6091. ALL OFF
  6092. <br>FULLHOURLY ON
  6093. </kbd>
  6094. </dl>
  6095.  
  6096. <h3><a name="quickgraph"><kbd>GRAPH</kbd> commands</a></h3>
  6097.  
  6098. <dl>
  6099. <dt><i>Commands</i>
  6100. <dd><kbd><a href="#GRAPH">ALLGRAPH</a>,
  6101. <a href="#GRAPH">MONTHGRAPH</a>,
  6102. <a href="#GRAPH">WEEKGRAPH</a>,
  6103. <a href="#GRAPH">DAYGRAPH</a>,
  6104. <a href="#GRAPH">FULLDAYGRAPH</a>,
  6105. <a href="#GRAPH">HOURGRAPH</a>,
  6106. <a href="#GRAPH">FULLHOURGRAPH</a>,
  6107. <a href="#GRAPH">QUARTERGRAPH</a>,
  6108. <a href="#GRAPH">FIVEGRAPH</a></kbd>
  6109. <dt><i>Syntax</i>
  6110. <dd><kbd>
  6111. COMMAND ("R" | "r" | "P" | "p" | "B" | "b")</kbd>
  6112. <dt><i>Example</i>
  6113. <dd><kbd>
  6114. ALLGRAPH B
  6115. </kbd>
  6116. </dl>
  6117.  
  6118. <h3><a name="quickback"><kbd>BACK</kbd> commands</a></h3>
  6119.  
  6120. <dl>
  6121. <dt><i>Commands</i>
  6122. <dd><kbd><a href="#BACK">ALLBACK</a>,
  6123. <a href="#BACK">MONTHBACK</a>,
  6124. <a href="#BACK">WEEKBACK</a>,
  6125. <a href="#BACK">FULLDAYBACK</a>,
  6126. <a href="#BACK">FULLHOURBACK</a>,
  6127. <a href="#BACK">QUARTERBACK</a>,
  6128. <a href="#BACK">FIVEBACK</a></kbd>
  6129. <dt><i>Syntax</i>
  6130. <dd><kbd>
  6131. COMMAND ("ON" | "OFF")</kbd>
  6132. <dt><i>Example</i>
  6133. <dd><kbd>
  6134. ALLBACK ON
  6135. </kbd>
  6136. </dl>
  6137.     
  6138. <h3><a name="quickrows"><kbd>ROWS</kbd> commands</a></h3>
  6139.  
  6140. <dl>
  6141. <dt><i>Commands</i>
  6142. <dd><kbd><a href="#ROWS">MONTHROWS</a>,
  6143. <a href="#ROWS">WEEKROWS</a>,
  6144. <a href="#ROWS">FULLDAYROWS</a>,
  6145. <a href="#ROWS">FULLHOURROWS</a>,
  6146. <a href="#ROWS">QUARTERROWS</a>,
  6147. <a href="#ROWS">FIVEROWS</a></kbd>
  6148. <dt><i>Syntax</i>
  6149. <dd><kbd>
  6150. COMMAND number</kbd>
  6151. <dt><i>Example</i>
  6152. <dd><kbd>
  6153. QUARTERROWS 192
  6154. </kbd>
  6155. </dl>
  6156.  
  6157. <h3><a name="quickcols"><kbd>COLS</kbd> commands</a></h3>
  6158.  
  6159. <dl>
  6160. <dt><i>1. Commands (time reports)</i>
  6161. <dd><kbd>
  6162. <a href="#timeCOLS">TIMECOLS</a>,
  6163. <a href="#timeCOLS">MONTHCOLS</a>,
  6164. <a href="#timeCOLS">WEEKCOLS</a>,
  6165. <a href="#timeCOLS">DAYCOLS</a>,
  6166. <a href="#timeCOLS">FULLDAYCOLS</a>,
  6167. <a href="#timeCOLS">HOURCOLS</a>,
  6168. <a href="#timeCOLS">FULLHOURCOLS</a>,
  6169. <a href="#timeCOLS">QUARTERCOLS</a>,
  6170. <a href="#timeCOLS">FIVECOLS</a></kbd>
  6171. <dt><i>Syntax</i>
  6172. <dd><kbd>cols1 := subset("RrPpBb")
  6173. <br>COMMAND cols1</kbd>
  6174. <dt><i>Example</i>
  6175. <dd><kbd>
  6176. MONTHCOLS bRP
  6177. </kbd>
  6178.  
  6179. <p><dt><i>2. Commands (most success reports)</i>
  6180. <dd><kbd>
  6181. <a href="#othCOLS">HOSTCOLS</a>,
  6182. <a href="#othCOLS">ORGCOLS</a>,
  6183. <a href="#othCOLS">DOMCOLS</a>,
  6184. <a href="#othCOLS">DIRCOLS</a>,
  6185. <a href="#othCOLS">REFCOLS</a>,
  6186. <a href="#othCOLS">REFSITECOLS</a>,
  6187. <a href="#othCOLS">SEARCHQUERYCOLS</a>,
  6188. <a href="#othCOLS">SEARCHWORDCOLS</a>,
  6189. <a href="#othCOLS">FULLBROWCOLS</a>,
  6190. <a href="#othCOLS">BROWCOLS</a>,
  6191. <a href="#othCOLS">OSCOLS</a>,
  6192. <a href="#othCOLS">VHOSTCOLS</a>,
  6193. <a href="#othCOLS">USERCOLS</a></kbd>
  6194. <dt><i>Syntax</i>
  6195. <dd><kbd>cols2 := subset("NDRrPpBb")
  6196. <br>COMMAND cols2</kbd>
  6197. <dt><i>Example</i>
  6198. <dd><kbd>
  6199. USERCOLS BD
  6200. </kbd>
  6201.     
  6202. <p><dt><i>3. Commands (Request and File Type Reports)</i>
  6203. <dd><kbd>
  6204. <a href="#othCOLS">REQCOLS</a>,
  6205. <a href="#othCOLS">TYPECOLS</a></kbd>
  6206. <dt><i>Syntax</i>
  6207. <dd><kbd>cols3 := subset("NDRrpBb")
  6208. <br>COMMAND cols3</kbd>
  6209. <dt><i>Example</i>
  6210. <dd><kbd>
  6211. TYPECOLS NRb
  6212. </kbd>
  6213.  
  6214.  
  6215. <p><dt><i>4. Commands (failure, redirection and Status Code reports)</i>
  6216. <dd><kbd>
  6217. <a href="#othCOLS">REDIRCOLS</a>,
  6218. <a href="#othCOLS">FAILCOLS</a>,
  6219. <a href="#othCOLS">REDIRREFCOLS</a>,
  6220. <a href="#othCOLS">FAILREFCOLS</a>,
  6221. <a href="#othCOLS">FAILUSERCOLS</a>,
  6222. <a href="#othCOLS">STATUSCOLS</a></kbd>
  6223. <dt><i>Syntax</i>
  6224. <dd><kbd>cols4 := subset("NDRr")
  6225. <br>COMMAND cols4</kbd>
  6226. <dt><i>Example</i>
  6227. <dd><kbd>
  6228. FAILCOLS D
  6229. </kbd>
  6230.  
  6231. <p><dt><i>5. Commands (Size and Processing Time Reports)</i>
  6232. <dd><kbd>
  6233. <a href="#othCOLS">SIZECOLS</a>,
  6234. <a href="#othCOLS">PROCTIMECOLS</a></kbd>
  6235. <dt><i>Syntax</i>
  6236. <dd><kbd>cols5 := subset("DRrPpBb")
  6237. <br>COMMAND cols5</kbd>
  6238. <dt><i>Example</i>
  6239. <dd><kbd>
  6240. SIZECOLS RB
  6241. </kbd>
  6242.  
  6243. </dl>
  6244.  
  6245.  
  6246. <h3><a name="quicksortby"><kbd>SORTBY</kbd> commands</a></h3>
  6247.  
  6248. <dl>
  6249. <dt><i>1. Commands (most success reports)</i>
  6250. <dd><kbd>
  6251. <a href="#SORTBY">HOSTSORTBY</a>,
  6252. <a href="#SORTBY">ORGSORTBY</a>,
  6253. <a href="#SORTBY">DOMSORTBY</a>,
  6254. <a href="#SORTBY">DIRSORTBY</a>,
  6255. <a href="#SORTBY">REFSORTBY</a>,
  6256. <a href="#SORTBY">REFSITESORTBY</a>,
  6257. <a href="#SORTBY">SEARCHQUERYSORTBY</a>,
  6258. <a href="#SORTBY">SEARCHWORDSORTBY</a>,
  6259. <a href="#SORTBY">FULLBROWSORTBY</a>,
  6260. <a href="#SORTBY">BROWSORTBY</a>,
  6261. <a href="#SORTBY">OSSORTBY</a>,
  6262. <a href="#SORTBY">VHOSTSORTBY</a>,
  6263. <a href="#SORTBY">USERSORTBY</a>,
  6264. <a href="#SUBSORTBY">SUBDIRSORTBY</a>,
  6265. <a href="#SUBSORTBY">SUBDOMSORTBY</a>,
  6266. <a href="#SUBSORTBY">SUBORGSORTBY</a>,
  6267. <a href="#SUBSORTBY">SUBBROWSORTBY</a>,
  6268. <a href="#ARGSSORTBY">SUBOSSORTBY</a>,
  6269. <a href="#SUBSORTBY">REFDIRSORTBY</a>,
  6270. <a href="#ARGSSORTBY">REFARGSSORTBY</a></kbd>
  6271. <dt><i>Syntax</i>
  6272. <dd><kbd>sortby1 := ("REQUESTS" | "PAGES" | "BYTES" | "DATE" | "ALPHABETICAL" | "RANDOM")
  6273. <br>COMMAND sortby1</kbd>
  6274. <dt><i>Example</i>
  6275. <dd><kbd>
  6276. DOMSORTBY ALPHABETICAL
  6277. </kbd>
  6278.     
  6279. <p><dt><i>2. Commands (Request and File Type Reports)</i>
  6280. <dd><kbd>
  6281. <a href="#SORTBY">REQSORTBY</a>,
  6282. <a href="#SORTBY">TYPESORTBY</a>,
  6283. <a href="#ARGSSORTBY">REQARGSSORTBY</a>,
  6284. <a href="#SUBSORTBY">SUBTYPESORTBY</a></kbd>
  6285. <dt><i>Syntax</i>
  6286. <dd><kbd>sortby2 := ("REQUESTS" | "BYTES" | "DATE" | "ALPHABETICAL" | "RANDOM")
  6287. <br>COMMAND sortby2</kbd>
  6288. <dt><i>Example</i>
  6289. <dd><kbd>
  6290. REQSORTBY REQUESTS
  6291. </kbd>
  6292.  
  6293. <p><dt><i>3. Commands (failure, redirection and Status Code reports)</i>
  6294. <dd><kbd>
  6295. <a href="#SORTBY">REDIRSORTBY</a>,
  6296. <a href="#SORTBY">FAILSORTBY</a>,
  6297. <a href="#SORTBY">REDIRREFSORTBY</a>,
  6298. <a href="#SORTBY">FAILREFSORTBY</a>,
  6299. <a href="#SORTBY">FAILUSERSORTBY</a>,
  6300. <a href="#SORTBY">STATUSSORTBY</a>,
  6301. <a href="#ARGSSORTBY">REDIRARGSSORTBY</a>,
  6302. <a href="#ARGSSORTBY">FAILARGSSORTBY</a>,
  6303. <a href="#ARGSSORTBY">REDIRREFARGSSORTBY</a>,
  6304. <a href="#ARGSSORTBY">FAILREFARGSSORTBY</a></kbd>
  6305. <dt><i>Syntax</i>
  6306. <dd><kbd>sortby3 := ("REQUESTS" | "DATE" | "ALPHABETICAL" | "RANDOM")
  6307. <br>COMMAND sortby3</kbd>
  6308. <dt><i>Example</i>
  6309. <dd><kbd>
  6310. FAILSORTBY DATE
  6311. </kbd>
  6312. </dl>
  6313.     
  6314. <h3><a name="quickfloor"><kbd>FLOOR</kbd> commands</a></h3>
  6315.  
  6316. <dl>
  6317. <dt><i>Commands (top-level)</i>
  6318. <dd><kbd>
  6319. <a href="#FLOOR">HOSTFLOOR</a>,
  6320. <a href="#FLOOR">ORGFLOOR</a>,
  6321. <a href="#FLOOR">DOMFLOOR</a>,
  6322. <a href="#FLOOR">REQFLOOR</a>,
  6323. <a href="#FLOOR">DIRFLOOR</a>,
  6324. <a href="#FLOOR">TYPEFLOOR</a>,
  6325. <a href="#FLOOR">REDIRFLOOR</a>,
  6326. <a href="#FLOOR">FAILFLOOR</a>,
  6327. <a href="#FLOOR">REFFLOOR</a>,
  6328. <a href="#FLOOR">REFSITEFLOOR</a>,
  6329. <a href="#FLOOR">SEARCHQUERYFLOOR</a>,
  6330. <a href="#FLOOR">SEARCHWORDFLOOR</a>,
  6331. <a href="#FLOOR">REDIRREFFLOOR</a>,
  6332. <a href="#FLOOR">FAILREFFLOOR</a>,
  6333. <a href="#FLOOR">FULLBROWFLOOR</a>,
  6334. <a href="#FLOOR">BROWFLOOR</a>,
  6335. <a href="#FLOOR">OSFLOOR</a>,
  6336. <a href="#FLOOR">VHOSTFLOOR</a>,
  6337. <a href="#FLOOR">USERFLOOR</a>,
  6338. <a href="#FLOOR">FAILUSERFLOOR</a>,
  6339. <a href="#FLOOR">STATUSFLOOR</a></kbd>
  6340.  
  6341. <dt><i>Commands (lower levels)</i>
  6342. <dd><kbd>
  6343. <a href="#ARGSFLOOR">REQARGSFLOOR</a>,
  6344. <a href="#ARGSFLOOR">REDIRARGSFLOOR</a>,
  6345. <a href="#ARGSFLOOR">FAILARGSFLOOR</a>,
  6346. <a href="#ARGSFLOOR">REFARGSFLOOR</a>,
  6347. <a href="#ARGSFLOOR">REDIRREFARGSFLOOR</a>,
  6348. <a href="#ARGSFLOOR">FAILREFARGSFLOOR</a>,
  6349. <a href="#SUBFLOOR">SUBDIRFLOOR</a>,
  6350. <a href="#SUBFLOOR">SUBDOMFLOOR</a>,
  6351. <a href="#SUBFLOOR">SUBORGFLOOR</a>,
  6352. <a href="#SUBFLOOR">SUBTYPEFLOOR</a>,
  6353. <a href="#SUBFLOOR">SUBBROWFLOOR</a>,
  6354. <a href="#ARGSFLOOR">SUBOSFLOOR</a>,
  6355. <a href="#SUBFLOOR">REFDIRFLOOR</a></kbd>
  6356.  
  6357. <dt><i>Syntax</i>
  6358. <dd><kbd>
  6359. partdate := ["+" | "-"] digit digit
  6360. <br>date :=  partdate partdate partdate [":" partdate partdate]
  6361. <br>COMMAND number ("r" | "p")
  6362. <br>COMMAND number ["k" | "M" | "G" | "T"] "b"
  6363. <br>COMMAND real ("%" | ":") ("r" | "p" | "b")
  6364. <br>COMMAND date "d"
  6365. <br>COMMAND "-" number ("r" | "p" | "b" | "d")</kbd>
  6366.  
  6367. <dt><i>Notes</i>
  6368. <dd>Actually, this syntax isn't quite correct. <kbd>REQFLOOR</kbd>,
  6369. <kbd>TYPEFLOOR</kbd>, <kbd>REQARGSFLOOR</kbd> and <kbd>SUBTYPEFLOOR</kbd>
  6370. aren't allowed to be of type <kbd>"p"</kbd>; and <kbd>REDIRFLOOR</kbd>,
  6371. <kbd>FAILFLOOR</kbd>, <kbd>REDIRREFFLOOR</kbd>, <kbd>FAILREFFLOOR</kbd>,
  6372. <kbd>FAILUSERFLOOR</kbd>, <kbd>STATUSFLOOR</kbd>, <kbd>REDIRARGSFLOOR</kbd>,
  6373. <kbd>FAILARGSFLOOR</kbd>, <kbd>REDIRREFARGSFLOOR</kbd> and
  6374. <kbd>FAILREFARGSFLOOR</kbd> aren't allowed to be of types <kbd>"p"</kbd> or
  6375. <kbd>"b"</kbd>.
  6376.  
  6377. <dt><i>Examples</i>
  6378. <dd><kbd>
  6379. TYPEFLOOR -20r
  6380. <br>REQARGSFLOOR 0.1%b
  6381. </kbd>
  6382. </dl>
  6383.  
  6384. <h3><a name="quicklinks">Hyperlinks</a></h3>
  6385.  
  6386. <dl>
  6387. <dt><i>Syntax</i>
  6388. <dd><kbd>
  6389. <a href="#LINKINCLUDE">LINKINCLUDE</a> *file
  6390. <br><a href="#LINKINCLUDE">LINKEXCLUDE</a> *file
  6391. <br><a href="#LINKINCLUDE">REFLINKINCLUDE</a> *referrer
  6392. <br><a href="#LINKINCLUDE">REFLINKEXCLUDE</a> *referrer
  6393. <br><a href="#BASEURL">BASEURL</a> prefix_string</kbd>
  6394. <dt><i>Examples</i>
  6395. <dd><kbd>
  6396. LINKINCLUDE pages
  6397. <br>REFLINKINCLUDE *.cgi
  6398. <br>BASEURL http://www.mycompany.com
  6399. </kbd>
  6400. </dl>
  6401.  
  6402. <h3><a name="quicklang">Language commands</a></h3>
  6403. <dl>
  6404.   <dt><i>Syntax</i>
  6405.   <dd><pre>
  6406. <a href="#LANGUAGE">LANGUAGE</a> ("ARMENIAN" | "BOSNIAN" | "CATALAN" | "SIMP-CHINESE" |
  6407.           "TRAD-CHINESE" | "CZECH" | "DANISH" | "DUTCH" | "ENGLISH" |
  6408.           "US-ENGLISH" | "FINNISH" | "FRENCH" | "GERMAN" | "GREEK" |
  6409.           "ITALIAN" | "JAPANESE" | "NORWEGIAN" | "NYNORSK" | "POLISH" |
  6410.           "PORTUGUESE" | "BR-PORTUGUESE" | "RUSSIAN" | "SERBIAN" | "SLOVAK" |
  6411.           "SLOVENE" | "SPANISH" | "SWEDISH" | "TURKISH" | "UKRAINIAN")
  6412. <a href="#LANGUAGE">LANGFILE</a> localfile
  6413. <a href="#domfile">DOMAINSFILE</a> localfile
  6414. </pre>
  6415. <dt><i>Notes</i>
  6416. <dd><a href="#LANGUAGE">Other languages</a> were available in
  6417. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">version 3</a> of analog,
  6418. and should be available for version 4 soon.
  6419. <dt><i>Examples</i>
  6420. <dd><kbd>
  6421. LANGUAGE ITALIAN
  6422. <br>LANGFILE lang/hindi.lng
  6423. </kbd>
  6424. </dl>
  6425.  
  6426. <h3><a name="quickcosmetic">Cosmetic and miscellaneous commands</a></h3>
  6427.  
  6428. <dl>
  6429. <dt><i>Syntax</i>
  6430. <dd><kbd>
  6431. <br><a href="#outstyle">OUTPUT</a> ("HTML" | "ASCII" | "COMPUTER" | "NONE")
  6432. <br><a href="#GOTOS">GOTOS</a> ("ON" | "OFF" | "FEW")
  6433. <br><a href="#RUNTIME">RUNTIME</a> ("ON" | "OFF")
  6434. <br><a href="#LASTSEVEN">LASTSEVEN</a> ("ON" | "OFF")
  6435. <br><a href="#REPORTORDER">REPORTORDER</a> perm("xcmdDhH45WriSoEItzsfKkuJvbB")
  6436. <br><a href="#IMAGEDIR">IMAGEDIR</a> URL
  6437. <br><a href="#NOROBOTS">NOROBOTS</a> ("ON" | "OFF")
  6438. <br><a href="#LOGO">LOGO</a> (URL | "none")
  6439. <br><a href="#HOSTNAME">HOSTNAME</a> string
  6440. <br><a href="#HOSTNAME">HOSTURL</a> (URL | "none")
  6441. <br><a href="#HEADERFILE">HEADERFILE</a> (localfile | "none")
  6442. <br><a href="#HEADERFILE">FOOTERFILE</a> (localfile | "none")
  6443. <br><a href="#STYLESHEET">STYLESHEET</a> (URL | "none")
  6444. <br><a href="#SEPCHAR">SEPCHAR</a> (char | "none")
  6445. <br><a href="#SEPCHAR">REPSEPCHAR</a> (char | "none")
  6446. <br><a href="#SEPCHAR">DECPOINT</a> char
  6447. <br><a href="#compout">COMPSEP</a> string
  6448. <br><a href="#RAWBYTES">RAWBYTES</a> ("ON" | "OFF")
  6449. <br><a href="#PAGEWIDTH">HTMLPAGEWIDTH</a> number
  6450. <br><a href="#PAGEWIDTH">ASCIIPAGEWIDTH</a> number
  6451. <br><a href="#BARSTYLE">BARSTYLE</a> ("a" | "b" | "c" | "d" | "e" | "f" | "g" | "h")
  6452. <br><a href="#MARKCHAR">MARKCHAR</a> char
  6453. <br><a href="#MINGRAPHWIDTH">MINGRAPHWIDTH</a> number
  6454. <br><a href="#WEEKBEGINSON">WEEKBEGINSON</a> ("SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY")
  6455. <br><a href="#SEARCHENGINE">SEARCHENGINE</a> *referrer comma-separated-strings
  6456. </kbd>
  6457. <dt><i>Examples</i>
  6458. <dd>Too many to list. See the documentation on each individual command.
  6459. </dl>
  6460.     
  6461. <h3><a name="quickdebug">Diagnostics</a></h3>
  6462.  
  6463. <dl>
  6464. <dt><i>Syntax</i>
  6465. <dd><kbd>
  6466. <a href="#settings">SETTINGS</a> ("ON" | "OFF")
  6467. <br><a href="#debugs">DEBUG</a> ("ON" | "OFF" | ["+" | "-"] subset("CDFSU"))
  6468. <br><a href="#WARNINGS">WARNINGS</a> ("ON" | "OFF" | ["+" | "-"] subset("CDEFLMR"))
  6469. <br><a href="#PROGRESSFREQ">PROGRESSFREQ</a> number
  6470. <br><a href="#ERRFILE">ERRFILE</a> localfile
  6471. <br><a href="#ERRLINELENGTH">ERRLINELENGTH</a> number</kbd>
  6472. <dt><i>Examples</i>
  6473. <dd><kbd>
  6474. DEBUG ON
  6475. <br>DEBUG CF
  6476. <br>WARNINGS -DL
  6477. <br>PROGRESSFREQ 50000
  6478. </kbd>
  6479. </dl>
  6480.     
  6481. <hr>
  6482. <hr>
  6483. <a name="indx"><h2>Index</h2>
  6484. </a>
  6485. [ <a href="#A">A</a> | <a href="#B">B</a> | <a href="#C">C</a> |
  6486. <a href="#D">D</a> | <a href="#E">E</a> | <a href="#F">F</a> |
  6487. <a href="#G">G</a> | <a href="#H">H</a> | <a href="#I">I</a> | J | K |
  6488. <a href="#L">L</a> | <a href="#M">M</a> | <a href="#N">N</a> | 
  6489. <a href="#O">O</a> | <a href="#P">P</a> | <a href="#Q">Q</a> | 
  6490. <a href="#R">R</a> | <a href="#S">S</a> | <a href="#T">T</a> | 
  6491. <a href="#U">U</a> | <a href="#V">V</a> | <a href="#W">W</a> | X |
  6492. <a href="#Y">Y</a> | Z ]
  6493.  
  6494. <p>
  6495. This is the index for this Readme. Follow the numbers after each name to
  6496. find references to that command or concept. Note that families of commands
  6497. are indexed under the second part of the name: for example,
  6498. <kbd>HOSTEXCLUDE</kbd> is under <kbd>*EXCLUDE</kbd>, not under <kbd>HOST</kbd>.
  6499. <p>
  6500. This index includes all of analog's configuration commands: if a command you
  6501. used in previous versions is not here, see the section on
  6502. <cite><a href="#update">Upgrading from earlier versions</a></cite>.
  6503. All commands are also listed in the <cite><a href="#quickref">Quick
  6504. reference</a></cite> with their syntax and examples, and that section is not
  6505. cross-referenced from this index.
  6506.  
  6507. <p><a name="A">Acknowledgements</a> [<a href="#acknow">1</a>]
  6508. <br>Addresses, numerical [<a href="#dns">1</a>]
  6509. <br><kbd>*ALIAS</kbd> [<a href="#alias">1</a>]
  6510. <br>Aliases [<a href="#alias">1</a>]
  6511. <br><kbd>ALL</kbd> [<a href="#ONOFF">1</a>]
  6512. <br><kbd>ALLBACK</kbd> [<a href="#BACK">1</a>]
  6513. <br><kbd>ALLGRAPH</kbd> [<a href="#GRAPH">1</a>]
  6514. <br><kbd>analog.cfg</kbd> [<a href="#startmac">1</a>][<a href="#startpc">2</a>][<a href="#startos2">3</a>][<a href="#startux">4</a>][<a href="#specialcfgs">5</a>]
  6515. <br><kbd>anlgform.html</kbd> [<a href="#form">1</a>]
  6516. <br><kbd>anlgform.pl</kbd> [<a href="#form">1</a>]
  6517. <br><kbd>anlghead.h</kbd> [<a href="#startux">1</a>][<a href="#syntax">2</a>]
  6518. <br>Announcements [<a href="#mailing">1</a>]
  6519. <br><kbd>APACHEDEFAULTLOGFORMAT</kbd> [<a href="#DEFAULTLOGFORMAT">1</a>]
  6520. <br><kbd>APACHELOGFORMAT</kbd> [<a href="#Apache">1</a>]
  6521. <br><kbd>ARGSEXCLUDE</kbd> [<a href="#ARGSINCLUDE">1</a>]
  6522. <br><kbd>*ARGSFLOOR</kbd> [<a href="#ARGSFLOOR">1</a>]
  6523. <br><kbd>ARGSINCLUDE</kbd> [<a href="#ARGSINCLUDE">1</a>]
  6524. <br><kbd>*ARGSSORTBY</kbd> [<a href="#ARGSSORTBY">1</a>]
  6525. <br>Arguments in URLs [<a href="#args">1</a>][<a href="#ARGSFLOOR">2</a>]
  6526. <br>ASCII output [<a href="#outstyle">1</a>]
  6527. <br><kbd>ASCIIPAGEWIDTH</kbd> [<a href="#PAGEWIDTH">1</a>]
  6528. <br><kbd><a name="B">*BACK</a></kbd> [<a href="#BACK">1</a>]
  6529. <br>Bar charts [<a href="#timereps">1</a>]
  6530. <br><kbd>BARSTYLE</kbd> [<a href="#BARSTYLE">1</a>]
  6531. <br><kbd>BASEURL</kbd> [<a href="#BASEURL">1</a>]
  6532. <br>Basic commands [<a href="#basiccmd">1</a>]
  6533. <br>Broken pipe [<a href="#brokenpipe">1</a>][<a href="#UNCOMPRESS">2</a>]
  6534. <br><kbd>BROW*</kbd> commands - see under second part of name
  6535. <br><kbd>BROWSER</kbd> [<a href="#replist">1</a>]
  6536. <br>Browser Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6537. <br>Browser Summary [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>]
  6538. <br><kbd>BROWSUM*</kbd> commands - see under second part of name
  6539. <br>Bugs, reporting [<a href="#mailing">1</a>]
  6540. <br>Bytes, how displayed [<a href="#RAWBYTES">1</a>]
  6541. <br><a name="C">Cache files</a> [<a href="#cache">1</a>]
  6542. <br><kbd>CACHEOUTFILE</kbd> [<a href="#cache">1</a>]
  6543. <br><kbd>CACHEFILE</kbd> [<a href="#cache">1</a>]
  6544. <br><kbd>CASE</kbd> [<a href="#CASE">1</a>]
  6545. <br>CGI program [<a href="#form">1</a>]
  6546. <br>"Click-thru"s [<a href="#defns">1</a>]
  6547. <br>Colours [<a href="#STYLESHEET">1</a>]
  6548. <br><kbd>*COLS</kbd> [<a href="#timeCOLS">1</a>][<a href="#othCOLS">2</a>]
  6549. <br><a name="clargs">Command line arguments</a> [<a href="#syntax">1</a>][<a href="#startpc">2</a>][<a href="#startos2">3</a>][<a href="#startux">4</a>]
  6550. <ul>
  6551.   <li>logfile name (<kbd>LOGFILE</kbd>) [<a href="#logfile">1</a>]
  6552.   <li><kbd>-</kbd> (<kbd>LOGFILE stdin</kbd>) [<a href="#logfile">1</a>]
  6553.   <li><kbd>4</kbd> (Quarter-Hour Report) [<a href="#replist">1</a>]
  6554.   <li><kbd>5</kbd> (Five-Minute Report) [<a href="#replist">1</a>]
  6555.   <li><kbd>A</kbd> (All reports) [<a href="#replist">1</a>]
  6556.   <li><kbd>a</kbd> (HTML/ASCII output) [<a href="#outstyle">1</a>]
  6557.   <li><kbd>B</kbd> (Browser Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6558.   <li><kbd>b</kbd> (Browser Summary) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6559.   <li><kbd>c</kbd> (Status Code Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6560.   <li><kbd>C</kbd> (Arbitrary configuration command) [<a href="#plusC">1</a>]
  6561.   <li><kbd>D</kbd> (Daily Report) [<a href="#replist">1</a>]
  6562.   <li><kbd>d</kbd> (Daily Summary) [<a href="#replist">1</a>]
  6563.   <li><kbd>E</kbd> (Redirection Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6564.   <li><kbd>F</kbd> (<kbd>FROM</kbd> date) [<a href="#FROMTO">1</a>]
  6565.   <li><kbd>f</kbd> (Referrer Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6566.   <li><kbd>G</kbd> (Default configuration file) [<a href="#specialcfgs">1</a>]
  6567.   <li><kbd>g</kbd> (Other configuration files) [<a href="#CONFIGFILE">1</a>]
  6568.   <li><kbd>H</kbd> (Hourly Report) [<a href="#replist">1</a>]
  6569.   <li><kbd>h</kbd> (Hourly Summary) [<a href="#replist">1</a>]
  6570.   <li><kbd>I</kbd> (Failure Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6571.   <li><kbd>i</kbd> (Directory Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6572.   <li><kbd>J</kbd> (Failed User Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6573.   <li><kbd>K</kbd> (Failed Referrer Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6574.   <li><kbd>k</kbd> (Redirected Referrer Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6575.   <li><kbd>m</kbd> (Monthly Report) [<a href="#replist">1</a>]
  6576.   <li><kbd>N</kbd> (Search Query Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6577.   <li><kbd>n</kbd> (Search Word Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6578.   <li><kbd>O</kbd> (Output file) [<a href="#OUTFILE">1</a>]
  6579.   <li><kbd>o</kbd> (Domain Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6580.   <li><kbd>P</kbd> (Processing Time Report) [<a href="#replist">1</a>]
  6581.   <li><kbd>p</kbd> (Operating System Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6582.   <li><kbd>q</kbd> (Warnings) [<a href="#WARNINGS">1</a>]
  6583.   <li><kbd>r</kbd> (Request Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6584.   <li><kbd>S</kbd> (Host Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6585.   <li><kbd>s</kbd> (Referring Site Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6586.   <li><kbd>settings</kbd> (Settings of all variables) [<a href="#settings">1</a>][<a href="#debug">2</a>]
  6587.   <li><kbd>T</kbd> (<kbd>TO</kbd> date) [<a href="#FROMTO">1</a>]
  6588.   <li><kbd>t</kbd> (File Type Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6589.   <li><kbd>U</kbd> (Cache file) [<a href="#cache">1</a>]
  6590.   <li><kbd>u</kbd> (User Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6591.   <li><kbd>V</kbd> (Debugging) [<a href="#debugs">1</a>]
  6592.   <li><kbd>v</kbd> (Virtual Host Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6593.   <li><kbd>W</kbd> (Weekly Report) [<a href="#replist">1</a>]
  6594.   <li><kbd>X</kbd> (Goto's) [<a href="#GOTOS">1</a>]
  6595.   <li><kbd>x</kbd> (General Summary) [<a href="#replist">1</a>]
  6596.   <li><kbd>Z</kbd> (Organisation Report) [<a href="#replist">1</a>][<a href="#othclarg">2</a>]
  6597.   <li><kbd>z</kbd> (File Size Report) [<a href="#replist">1</a>]
  6598. </ul>
  6599. <br>Compilation problems [<a href="#startux">1</a>]
  6600. <br>Compiling [<a href="#startux">1</a>]
  6601. <br>Compressed logfiles [<a href="#UNCOMPRESS">1</a>]
  6602. <br><kbd>COMPSEP</kbd> [<a href="#compout">1</a>]
  6603. <br>Computer-readable output style [<a href="#compout">1</a>]
  6604. <br><kbd>CONFIGFILE</kbd> [<a href="#CONFIGFILE">1</a>]
  6605. <br>Configuration files [<a href="#startmac">1</a>][<a href="#startpc">2</a>][<a href="#startos2">3</a>][<a href="#startux">4</a>][<a href="#syntax">5</a>]
  6606. <br>Configuration file, default [<a href="#specialcfgs">1</a>]
  6607. <br>Configuration file, mandatory [<a href="#specialcfgs">1</a>]
  6608. <br>Contents [<a href="#map">1</a>]
  6609. <br>Contributors [<a href="#acknow">1</a>]
  6610. <br>Cookies [<a href="#fmtstrings">1</a>]
  6611. <br>Corrupt logfile lines, definition [<a href="#defns">1</a>]
  6612. <br>Countries [<a href="#domfile">1</a>]
  6613. <br>Crashes [<a href="#errors">1</a>]
  6614. <br>Customising analog [<a href="#custom">1</a>]
  6615. <br><kbd><a name="D">DAILY</a></kbd> [<a href="#replist">1</a>]
  6616. <br>Daily Report [<a href="#reptime">1</a>][<a href="#replist">2</a>][<a href="#timereps">3</a>]
  6617. <br>Daily Summary [<a href="#reptimesum">1</a>][<a href="#replist">2</a>][<a href="#timereps">3</a>]
  6618. <br>Date reports [<a href="#reptime">1</a>][<a href="#timereps">2</a>]
  6619. <br>Dates, restricting [<a href="#FROMTO">1</a>]
  6620. <br><kbd>DAY*</kbd> commands - see under second part of name
  6621. <br>Debugging [<a href="#debug">1</a>]
  6622. <br><kbd>DECPOINT</kbd> [<a href="#SEPCHAR">1</a>]
  6623. <br>Default configuration file [<a href="#specialcfgs">1</a>]
  6624. <br>Default logfile format [<a href="#DEFAULTLOGFORMAT">1</a>]
  6625. <br><kbd>DEFAULTLOGFORMAT</kbd> [<a href="#DEFAULTLOGFORMAT">1</a>]
  6626. <br>Definitions [<a href="#defns">1</a>]
  6627. <br><kbd>DIR*</kbd> commands - see under second part of name
  6628. <br><kbd>DIRECTORY</kbd> [<a href="#replist">1</a>]
  6629. <br>Directory Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6630. <br><kbd>DIRSUFFIX</kbd> [<a href="#DIRSUFFIX">1</a>]
  6631. <br><kbd>DNS</kbd> [<a href="#dns">1</a>]
  6632. <br>DNS lookups [<a href="#dns">1</a>]
  6633. <br><kbd>DNSBADHOURS</kbd> [<a href="#dns">1</a>]
  6634. <br><kbd>DNSFILE</kbd> [<a href="#dns">1</a>]
  6635. <br><kbd>DNSGOODHOURS</kbd> [<a href="#dns">1</a>]
  6636. <br><kbd>DNSLOCKFILE</kbd> [<a href="#dns">1</a>]
  6637. <br><kbd>DOM*</kbd> commands - see under second part of name
  6638. <br><kbd>DOMAIN</kbd> [<a href="#replist">1</a>]
  6639. <br>Domain Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>][<a href="#domfile">5</a>]
  6640. <br>Domains file [<a href="#domfile">1</a>]
  6641. <br><kbd>DOMAINSFILE</kbd> [<a href="#domfile">1</a>]
  6642. <br><kbd><a name="E">ERRFILE</a></kbd> [<a href="#ERRFILE">1</a>]
  6643. <br><kbd>ERRLINELENGTH</kbd> [<a href="#ERRLINELENGTH">1</a>]
  6644. <br>error_log [<a href="#designfaq">1</a>][<a href="#abolished290b1">2</a>]
  6645. <br>Error Report [<a href="#abolished290b1">1</a>]
  6646. <br>Errors [<a href="#errors">1</a>]
  6647. <br>Example reports [<a href="#Readme">1</a>]
  6648. <br>Examples of each command [<a href="#quickref">1</a>]
  6649. <br><kbd>*EXCLUDE</kbd> [<a href="#include">1</a>]
  6650. <br>Exclusions [<a href="#include">1</a>]
  6651. <br><kbd><a name="F">FAIL*</a></kbd> commands - see under second part of name
  6652. <br>Failed Referrer Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6653. <br>Failed requests, definition [<a href="#defns">1</a>]
  6654. <br>Failed User Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>]
  6655. <br><kbd>FAILREF</kbd> [<a href="#replist">1</a>]
  6656. <br><kbd>FAILREF*</kbd> commands - see under second part of name
  6657. <br><kbd>FAILURE</kbd> [<a href="#replist">1</a>]
  6658. <br>Failure Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6659. <br><kbd>FAILUSER</kbd> [<a href="#replist">1</a>]
  6660. <br><kbd>FAILUSER*</kbd> commands - see under second part of name
  6661. <br>FAQ [<a href="#faq">1</a>]
  6662. <br>Fatal errors [<a href="#errors">1</a>]
  6663. <br><kbd>FILE*</kbd> commands - see under second part of name
  6664. <br>File, definition [<a href="#defns">1</a>]
  6665. <br>File Size Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>]
  6666. <br>File Type Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6667. <br><kbd>FILETYPE</kbd> [<a href="#replist">1</a>]
  6668. <br>Filters [<a href="#include">1</a>]
  6669. <br>First day of week [<a href="#WEEKBEGINSON">1</a>]
  6670. <br><kbd>FIVE</kbd> [<a href="#replist">1</a>]
  6671. <br><kbd>FIVE*</kbd> commands - see under second part of name
  6672. <br>Five-Minute Report [<a href="#reptime">1</a>][<a href="#replist">2</a>][<a href="#timereps">3</a>]
  6673. <br><kbd>*FLOOR</kbd> [<a href="#FLOOR">1</a>][<a href="#SUBFLOOR">2</a>][<a href="#ARGSFLOOR">3</a>]
  6674. <br><kbd>FOOTERFILE</kbd> [<a href="#HEADERFILE">1</a>]
  6675. <br>Form interface [<a href="#form">1</a>]
  6676. <br>Frequently Asked Questions [<a href="#faq">1</a>]
  6677. <br><kbd>FROM</kbd> [<a href="#FROMTO">1</a>]
  6678. <br><kbd>FULLBROW*</kbd> commands - see under second part of name
  6679. <br><kbd>FULLBROWSER</kbd> [<a href="#replist">1</a>]
  6680. <br><kbd>FULLDAILY</kbd> [<a href="#replist">1</a>]
  6681. <br><kbd>FULLDAY*</kbd> commands - see under second part of name
  6682. <br><kbd>FULLHOUR*</kbd> commands - see under second part of name
  6683. <br><kbd>FULLHOURLY</kbd> [<a href="#replist">1</a>]
  6684. <br><kbd><a name="G">GENERAL</a></kbd> [<a href="#replist">1</a>]
  6685. <br>General Summary [<a href="#repgen">1</a>][<a href="#replist">2</a>]
  6686. <br><kbd>GOTOS</kbd> [<a href="#replist">1</a>]
  6687. <br><kbd>*GRAPH</kbd> [<a href="#GRAPH">1</a>]
  6688. <br>Graphs [<a href="#timereps">1</a>]
  6689. <br><kbd><a name="H">HEADERFILE</a></kbd> [<a href="#HEADERFILE">1</a>]
  6690. <br>Helper applications [<a href="#helpers">1</a>]
  6691. <br>Hierarchical reports [<a href="#hierreps">1</a>]
  6692. <br>Hits [<a href="#defns">1</a>]
  6693. <br>Home page [<a href="#Readme">1</a>]
  6694. <br><kbd>HOST</kbd> [<a href="#replist">1</a>]
  6695. <br><kbd>HOST*</kbd> commands - see under second part of name
  6696. <br>Host, definition [<a href="#defns">1</a>]
  6697. <br>Host Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>]
  6698. <br><kbd>HOSTNAME</kbd> [<a href="#HOSTNAME">1</a>]
  6699. <br>Hostnames, numerical [<a href="#dns">1</a>]
  6700. <br><kbd>HOSTREP*</kbd> commands - see under second part of name
  6701. <br><kbd>HOSTURL</kbd> [<a href="#HOSTNAME">1</a>]
  6702. <br><kbd>HOUR*</kbd> commands - see under second part of name
  6703. <br><kbd>HOURLY</kbd> [<a href="#replist">1</a>]
  6704. <br>Hourly Report [<a href="#reptime">1</a>][<a href="#replist">2</a>][<a href="#timereps">3</a>]
  6705. <br>Hourly Summary [<a href="#reptimesum">1</a>][<a href="#replist">2</a>][<a href="#timereps">3</a>]
  6706. <br>HTML output [<a href="#outstyle">1</a>]
  6707. <br><kbd>HTMLPAGEWIDTH</kbd> [<a href="#PAGEWIDTH">1</a>]
  6708. <br><kbd><a name="I">IMAGEDIR</a></kbd> [<a href="#IMAGEDIR">1</a>]
  6709. <br><kbd>*INCLUDE</kbd> [<a href="#include">1</a>]
  6710. <br>Inclusions and exclusions [<a href="#include">1</a>]
  6711. <br>Introduction [<a href="#Readme">1</a>]
  6712. <br>IP addresses [<a href="#dns">1</a>]
  6713. <br><kbd><a name="L">LANGFILE</a></kbd> [<a href="#LANGUAGE">1</a>]
  6714. <br><kbd>LANGUAGE</kbd> [<a href="#LANGUAGE">1</a>]
  6715. <br>Languages [<a href="#LANGUAGE">1</a>][<a href="#domfile">2</a>]
  6716. <br><kbd>LASTSEVEN</kbd> [<a href="#LASTSEVEN">1</a>]
  6717. <br>Licence [<a href="Licence.txt">1</a>][<a href="#Readme">2</a>]
  6718. <br><kbd>LINKEXCLUDE</kbd> [<a href="#LINKINCLUDE">1</a>]
  6719. <br><kbd>LINKINCLUDE</kbd> [<a href="#LINKINCLUDE">1</a>]
  6720. <br><kbd>LOGFILE</kbd> [<a href="#logfile">1</a>]
  6721. <br>Logfile formats [<a href="#logfmt">1</a>][<a href="#logfile">2</a>]
  6722. <br>Logfile prefix [<a href="#secondarg">1</a>]
  6723. <br>Logfiles [<a href="#logfile">1</a>]
  6724. <br>Logfiles, choosing [<a href="#logfile">1</a>]
  6725. <br>Logfiles, compressed [<a href="#UNCOMPRESS">1</a>]
  6726. <br>Logfiles, finding [<a href="#start">1</a>]
  6727. <br><kbd>LOGFORMAT</kbd> [<a href="#logfmt">1</a>]
  6728. <br><kbd>LOGO</kbd> [<a href="#LOGO">1</a>]
  6729. <br><kbd>LOGTIMEOFFSET</kbd> [<a href="#TIMEOFFSET">1</a>]
  6730. <br>Low memory [<a href="#lowmem">1</a>]
  6731. <br><kbd>*LOWMEM</kbd> [<a href="#lowmem">1</a>][<a href="#cache">2</a>]
  6732. <br><a name="M">Mailing lists</a> [<a href="#mailing">1</a>]
  6733. <br>Makefile [<a href="#startux">1</a>]
  6734. <br>Mandatory configuration file [<a href="#specialcfgs">1</a>]
  6735. <br>Map [<a href="#map">1</a>]
  6736. <br><kbd>MARKCHAR</kbd> [<a href="#MARKCHAR">1</a>]
  6737. <br>Meaning of reports [<a href="#meaning">1</a>]
  6738. <br>Memory, using less [<a href="#lowmem">1</a>]
  6739. <br><kbd>MINGRAPHWIDTH</kbd> [<a href="#MINGRAPHWIDTH">1</a>]
  6740. <br><kbd>MONTH*</kbd> commands - see under second part of name
  6741. <br><kbd>MONTHLY</kbd> [<a href="#replist">1</a>]
  6742. <br>Monthly Report [<a href="#reptime">1</a>][<a href="#replist">2</a>][<a href="#timereps">3</a>]
  6743. <br><a name="N">Non-time reports</a> [<a href="#repoth">1</a>][<a href="#othreps">2</a>]
  6744. <br><kbd>NOROBOTS</kbd> [<a href="#NOROBOTS">1</a>]
  6745. <br>Numerical addresses [<a href="#dns">1</a>]
  6746. <br>Numerical hostnames [<a href="#dns">1</a>]
  6747. <br><a name="O">Operating System Report</a> [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#ARGSFLOOR">4</a>]
  6748. <br><kbd>ORG*</kbd> commands - see under second part of name
  6749. <br><kbd>ORGANISATION</kbd> [<a href="#replist">1</a>]
  6750. <br>Organisations, definition [<a href="#domfile">1</a>]
  6751. <br>Organisation Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#domfile">4</a>]
  6752. <br>OS Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#ARGSFLOOR">4</a>]
  6753. <br><kbd>OS*</kbd> commands - see under second part of name
  6754. <br><kbd>OSREP</kbd> [<a href="#replist">1</a>]
  6755. <br><kbd>OUTFILE</kbd> [<a href="#OUTFILE">1</a>]
  6756. <br><kbd>OUTPUT</kbd> [<a href="#outstyle">1</a>]
  6757. <br>Output aliases [<a href="#OUTPUTALIAS">1</a>]
  6758. <br><kbd>OUTPUT COMPUTER</kbd> [<a href="#outstyle">1</a>][<a href="#compout">2</a>]
  6759. <br>Output, configuring [<a href="#output">1</a>]
  6760. <br>Output style, computer readable [<a href="#compout">1</a>]
  6761. <br>Output styles [<a href="#outstyle">1</a>]
  6762. <br><kbd>*OUTPUTALIAS</kbd> [<a href="#OUTPUTALIAS">1</a>]
  6763. <br><a name="P">Page, definition</a> [<a href="#defns">1</a>]
  6764. <br><kbd>PAGEEXCLUDE</kbd> [<a href="#PAGEINCLUDE">1</a>]
  6765. <br><kbd>PAGEINCLUDE</kbd> [<a href="#PAGEINCLUDE">1</a>]
  6766. <br>Pages, defining [<a href="#PAGEINCLUDE">1</a>]
  6767. <br><kbd>*PAGEWIDTH</kbd> [<a href="#PAGEWIDTH">1</a>]
  6768. <br>Path through site [<a href="#webworks">1</a>]
  6769. <br>Processing Time Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>]
  6770. <br><kbd>PROCTIME</kbd> [<a href="#replist">1</a>]
  6771. <br><kbd>PROCTIME*</kbd> commands - see under second part of name
  6772. <br><kbd>PROGRESSFREQ</kbd> [<a href="#PROGRESSFREQ">1</a>]
  6773. <br><kbd><a name="Q">QUARTER</a></kbd> [<a href="#replist">1</a>]
  6774. <br><kbd>QUARTER*</kbd> commands - see under second part of name
  6775. <br>Quarter-Hour Report [<a href="#reptime">1</a>][<a href="#replist">2</a>][<a href="#timereps">3</a>]
  6776. <br>Quick reference [<a href="#quickref">1</a>]
  6777. <br><kbd><a name="R">RAWBYTES</a></kbd> [<a href="#RAWBYTES">1</a>]
  6778. <br><kbd>REDIR</kbd> [<a href="#replist">1</a>]
  6779. <br><kbd>REDIR*</kbd> commands - see under second part of name
  6780. <br>Redirected Referrer Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6781. <br>Redirected requests, definition [<a href="#defns">1</a>]
  6782. <br>Redirection Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6783. <br><kbd>REDIRREF</kbd> [<a href="#replist">1</a>]
  6784. <br><kbd>REDIRREF*</kbd> commands - see under second part of name
  6785. <br><kbd>REF*</kbd> commands - see under second part of name
  6786. <br><kbd>REFARGSEXCLUDE</kbd> [<a href="#ARGSINCLUDE">1</a>]
  6787. <br><kbd>REFARGSINCLUDE</kbd> [<a href="#ARGSINCLUDE">1</a>]
  6788. <br><kbd>REFDIR</kbd> [<a href="#hierreps">1</a>]
  6789. <br>Reference, quick [<a href="#quickref">1</a>]
  6790. <br><kbd>REFERRER</kbd> [<a href="#replist">1</a>]
  6791. <br>Referrer, definition [<a href="#defns">1</a>]
  6792. <br>Referrer Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6793. <br>Referring Site Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6794. <br><kbd>REFLINKEXCLUDE</kbd> [<a href="#LINKINCLUDE">1</a>]
  6795. <br><kbd>REFLINKINCLUDE</kbd> [<a href="#LINKINCLUDE">1</a>]
  6796. <br><kbd>REFREP*</kbd> commands - see under second part of name
  6797. <br><kbd>REFSITE</kbd> [<a href="#replist">1</a>]
  6798. <br><kbd>REFSITE*</kbd> commands - see under second part of name
  6799. <br>Regular expressions [<a href="#aliasregexp">1</a>][<a href="#incregexp">2</a>]
  6800. <br><kbd>Report.html</kbd> [<a href="#startmac">1</a>][<a href="#startpc">2</a>][<a href="#startos2">3</a>]
  6801. <br>Reporting bugs [<a href="#mailing">1</a>]
  6802. <br><kbd>REPORTORDER</kbd> [<a href="#REPORTORDER">1</a>]
  6803. <br>Reports, list of [<a href="#reports">1</a>][<a href="#replist">2</a>]
  6804. <br><kbd>REPSEPCHAR</kbd> [<a href="#SEPCHAR">1</a>]
  6805. <br><kbd>REQ*</kbd> commands - see under second part of name
  6806. <br><kbd>REQUEST</kbd> [<a href="#replist">1</a>]
  6807. <br>Request Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#hierreps">4</a>]
  6808. <br>Requests, definition [<a href="#defns">1</a>]
  6809. <br>Requests for pages, defining [<a href="#PAGEINCLUDE">1</a>]
  6810. <br>Requests for pages, definition [<a href="#defns">1</a>]
  6811. <br>Requests, types of [<a href="#defns">1</a>]
  6812. <br>Robots, discouraging [<a href="#NOROBOTS">1</a>]
  6813. <br><kbd>*ROWS</kbd> [<a href="#ROWS">1</a>]
  6814. <br><kbd>RUNTIME</kbd> [<a href="#RUNTIME">1</a>]
  6815. <br><a name="S">Sample reports</a> [<a href="#Readme">1</a>]
  6816. <br>Search arguments [<a href="#args">1</a>][<a href="#ARGSFLOOR">2</a>] -- see also Search Query Report and Search Word Report below
  6817. <br>Search Query Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#SEARCHENGINE">4</a>]
  6818. <br>Search Word Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>][<a href="#SEARCHENGINE">4</a>]
  6819. <br><kbd>SEARCHCHARCONVERT</kbd> [<a href="#SCC">1</a>]
  6820. <br><kbd>SEARCHENGINE</kbd> [<a href="#SEARCHENGINE">1</a>]
  6821. <br><kbd>SEARCHQUERY</kbd> [<a href="#replist">1</a>]
  6822. <br><kbd>SEARCHQUERY*</kbd> commands - see under second part of name
  6823. <br><kbd>SEARCHWORD</kbd> [<a href="#replist">1</a>]
  6824. <br><kbd>SEARCHWORD*</kbd> commands - see under second part of name
  6825. <br>Search engines, discouraging [<a href="#NOROBOTS">1</a>]
  6826. <br><kbd>SEPCHAR</kbd> [<a href="#SEPCHAR">1</a>]
  6827. <br><kbd>SETTINGS</kbd> [<a href="#settings">1</a>][<a href="#debug">2</a>]
  6828. <br><kbd>SIZE</kbd> [<a href="#replist">1</a>]
  6829. <br><kbd>SIZE*</kbd> commands - see under second part of name
  6830. <br><kbd>*SORTBY</kbd> [<a href="#SORTBY">1</a>][<a href="#SUBSORTBY">2</a>][<a href="#ARGSSORTBY">3</a>]
  6831. <br>Source code [<a href="#startux">1</a>]
  6832. <br>Spiders, discouraging [<a href="#NOROBOTS">1</a>]
  6833. <br>Starting to use analog [<a href="#start">1</a>]
  6834. <br>Starting to use analog on a Mac [<a href="#startmac">1</a>]
  6835. <br>Starting to use analog on OS/2 [<a href="#startos2">1</a>]
  6836. <br>Starting to use analog on Windows [<a href="#startpc">1</a>]
  6837. <br>Starting to use analog on other platforms [<a href="#startux">1</a>]
  6838. <br><kbd>STATUS</kbd> [<a href="#replist">1</a>]
  6839. <br>Status Code Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>]
  6840. <br><kbd>STATUS*</kbd> commands - see under second part of name
  6841. <br><kbd>STYLESHEET</kbd> [<a href="#STYLESHEET">1</a>]
  6842. <br><kbd>SUBBROW</kbd> [<a href="#hierreps">1</a>]
  6843. <br><kbd>SUBDIR</kbd> [<a href="#hierreps">1</a>]
  6844. <br>Subdirectories [<a href="#hierreps">1</a>]
  6845. <br><kbd>SUBDOMAIN</kbd> [<a href="#hierreps">1</a>]
  6846. <br>Subdomains [<a href="#hierreps">1</a>]
  6847. <br><kbd>SUB*FLOOR</kbd> [<a href="#SUBFLOOR">1</a>]
  6848. <br><kbd>SUBORG</kbd> [<a href="#hierreps">1</a>]
  6849. <br><kbd>SUB*SORTBY</kbd> [<a href="#SUBSORTBY">1</a>]
  6850. <br><kbd>SUBTYPE</kbd> [<a href="#hierreps">1</a>]
  6851. <br>Successful requests, definition [<a href="#defns">1</a>]
  6852. <br>Syntax [<a href="#syntax">1</a>][<a href="#quickref">2</a>]
  6853. <br><a name="T">Time reports</a> [<a href="#reptime">1</a>][<a href="#timereps">2</a>]
  6854. <br><kbd>TIMECOLS</kbd> [<a href="#timeCOLS">1</a>]
  6855. <br><kbd>TIMEOFFSET</kbd> [<a href="#TIMEOFFSET">1</a>]
  6856. <br>Times, restricting [<a href="#FROMTO">1</a>]
  6857. <br>Title line [<a href="#LOGO">1</a>][<a href="#HOSTNAME">2</a>]
  6858. <br><kbd>TO</kbd> [<a href="#FROMTO">1</a>]
  6859. <br>Total requests, definition [<a href="#defns">1</a>]
  6860. <br>Translators [<a href="#acknow">1</a>]
  6861. <br>Tree reports [<a href="#hierreps">1</a>]
  6862. <br><kbd>TYPE*</kbd> commands - see under second part of name
  6863. <br><kbd><a name="U">UNCOMPRESS</a></kbd> [<a href="#UNCOMPRESS">1</a>]
  6864. <br>Unresolved numerical addresses [<a href="#dns">1</a>]
  6865. <br>Unwanted logfile entries, definition [<a href="#defns">1</a>]
  6866. <br>Upgrading from earlier versions [<a href="#update">1</a>]
  6867. <br><kbd>USER</kbd> [<a href="#replist">1</a>]
  6868. <br><kbd>USER*</kbd> commands - see under second part of name
  6869. <br><kbd>USERCASE</kbd> [<a href="#CASE">1</a>]
  6870. <br>User Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>]
  6871. <br><kbd>USERREP*</kbd> commands - see under second part of name
  6872. <br><kbd><a name="V">VHOST</a></kbd> [<a href="#replist">1</a>]
  6873. <br><kbd>VHOST*</kbd> commands - see under second part of name
  6874. <br><kbd>VHOSTREP*</kbd> commands - see under second part of name
  6875. <br>Virtual domains/virtual hosts [<a href="#advfaq">1</a>][<a href="#secondarg">2</a>]
  6876. <br>Virtual Host Report [<a href="#repoth">1</a>][<a href="#replist">2</a>][<a href="#othreps">3</a>]
  6877. <br>Visitors [<a href="#webworks">1</a>]
  6878. <br>Visits [<a href="#webworks">1</a>]
  6879. <br><kbd><a name="W">WARNINGS</a></kbd> [<a href="#WARNINGS">1</a>]
  6880. <br>Warnings [<a href="#WARNINGS">1</a>][<a href="#warns">2</a>]
  6881. <br><kbd>WEEK*</kbd> commands - see under second part of name
  6882. <br><kbd>WEEKBEGINSON</kbd> [<a href="#WEEKBEGINSON">1</a>]
  6883. <br><kbd>WEEKLY</kbd> [<a href="#replist">1</a>]
  6884. <br>Weekly Report [<a href="#reptime">1</a>][<a href="#replist">2</a>][<a href="#timereps">3</a>]
  6885. <br>What was new? [<a href="#wasnew3">1</a>][<a href="#wasnew2">2</a>][<a href="#wasnew1">3</a>]
  6886. <br>What's new? [<a href="#whatsnew">1</a>][<a href="#update">2</a>]
  6887. <br><a name="Y">Year 2000 compatibility</a> [<a href="#startfaq">1</a>]
  6888. <p>
  6889. [ <a href="#A">A</a> | <a href="#B">B</a> | <a href="#C">C</a> |
  6890. <a href="#D">D</a> | <a href="#E">E</a> | <a href="#F">F</a> |
  6891. <a href="#G">G</a> | <a href="#H">H</a> | <a href="#I">I</a> | J | K |
  6892. <a href="#L">L</a> | <a href="#M">M</a> | <a href="#N">N</a> | 
  6893. <a href="#O">O</a> | <a href="#P">P</a> | <a href="#Q">Q</a> | 
  6894. <a href="#R">R</a> | <a href="#S">S</a> | <a href="#T">T</a> | 
  6895. <a href="#U">U</a> | <a href="#V">V</a> | <a href="#W">W</a> | X |
  6896. <a href="#Y">Y</a> | Z ]
  6897.  
  6898. <hr>
  6899. <address><a HREF="http://www.statslab.cam.ac.uk/~sret1/">Stephen Turner</a>
  6900. <br>Need help with analog? <a href="#mailing">Subscribe to the analog-help mailing list</a>
  6901. </address>
  6902. </body></html>
  6903.